angular-restmod
angular-restmod copied to clipboard
DirtyModel mixin when $build-ing records
It seems, that you can't use DirtyModel mixin for a newly built records (before record was saved). Real life use case: you want to show warning popup about unsaved data, when user typed anything in the "New Post" form and trying to leave page. So when user opens this form we $build a new record for the post and we want to check when this new record becomes dirty.
Hmm, you are right, the initial design was intended only to compare changes with already persisted data. I'll take a look to see if usage can be extended to what you propose.