Hi André. You know directives can have controllers right? (just a slight side-remark, not much to do with your issue!)
You should separate your state, from your data. the state (I need nr 1 to 10, and I need it ordered by zzyy..) needs to be in your directive. The data, should be in a shared service. This allows you to do whatever you want. If you have some really crazy things in your directive, you can even create a copy of the data in memory, and write it back whenever needed. There will be a tax involved in that (added complexity and memory requirements), but it is a good way to keep the separations in place. If it's something you need to do often, you might even create a service that does the copying and re-integration of the data. 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 http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
