Hi,
        I have come across a scenario wherein the method passed into an 
isolated directive, which it resolves using '&', is getting resolved 
against its own scope (if such an object is there in it), instead of 
resolving it against its parent scope.

Plunkr: http://plnkr.co/edit/jLRNlgdq9AO0JLsKt9t1?p=preview 

In the plunkr above, I've tried to replicate the problem. 
There, I have 2 isolated directives,

   - *isolated-parent-dir* and *isolated-child-dir and the latter* is an 
   attribute directive*.*
   - The *isolated-parent-dir*'s template wires the isolated-child-dir. 
   - So the DOM after processing the parent would be:

<parent-isolated-dir>
        <div child-isolated-dir="click.handler()"></div>
</parent-isolated-dir>

parent-isolated-dir,

   - has a method *click.handler* exposed in its scope.

child-isolated-dir, 

   - retains a counter *click.counter* in its scope.
   - has registered a click event handler that internally triggers 
   childIsolatedDir()

But the parent's click.handler is not getting fired. I tried wiring the 
click.handler in the child and saw that then, it got fired. So is the 
parent's click getting overridden by the child's click object while 
resolving the callback binding?

Hoping for an explanation for this behaviour,
Thanking You,
Parvathy


-- 
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.

Reply via email to