Hi Sander, I get what you're saying. This ng-repeat is not part of another ng-repeat and I also didn't find another surrounding directive that does create its own scope.
I could be wrong though, need to check more thorough. However your explanation makes sense. Thanks, Torsten. 2014-08-18 14:52 GMT+02:00 Sander Elias <[email protected]>: > Hi Torsten, > > Assuming from your code, this code is part of another ng-repeat right? (or > at least the child of another directive that creates a new scope!) > Every repeated item has its own new scope. You can't access a child-scope > property from the controller. > However, objects are linked by reference, that's why your second solution > works. > > Does this make sense to you? > > Regards > Sander Elias > > -- > You received this message because you are subscribed to a topic in the > Google Groups "AngularJS" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/angular/Zsg9WM1KAGI/unsubscribe. > To unsubscribe from this group and all its topics, 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. > -- AGYNAMIX(R). Passionate Software. Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim Phone: +49 3721 273445 Fax: +49 3721 273446 Mobile: +49 151 12412427 Web: http://www.agynamix.de Author of "Lift Web Applications How-To <http://www.packtpub.com/lift-web-applications/book>" -- 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.
