Hi guys I'm having difficulty understanding why there appear to be differences in the inheritance model of scopes that get set up inside controllers defined in the markup and those set up inside controllers defined in directives.
I have created a plnkr to demonstrate what I mean - http://plnkr.co/edit/JqkzD9sYHJV2pqQO28Zq?p=preview In the first section I have nested scopes by defining controllers in the elements. There is a function msg1() that gets overridden in the child scope but does not affect the parent scope. This is as I would expect. In the second section, the scopes are nested by a controller defined in a directive. Here, msg2() gets overridden by the child scope but it also redefines msg2() on the parent scope. This feels like a bug in angular to me but it appears to have been in the code since 1.2.0 so I'm guessing that there's a reason for it. Can anyone explain it to me? Thanks Darren -- 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/groups/opt_out.
