Hi Pelle,

First of all, components should not keep data at all! Data belongs in 
services. The same thing goes for state (amIDirty is a state!) 
I would create a service where I would keep a registry of components that 
are 'dirty', each component can then manage it's own dirty state, and aso 
provide a 'save' or 'reject' method in the same registry. Also it can 
remove itself once it becomes 'clean' again.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to