I've created a directive that uses transclusion.  When I use the directive 
as follows:

 <div ng-controller="ParentCtrl">
     <area:tree area="areaTree"><a 
ng-click="foo()">{{area.name}}</a></area:tree>
  </div>

The foo() method is called in the directives scope, not the scope of the 
ParentCtrl.  This is shown in this punkler:

http://plnkr.co/edit/otEdXGfI1NMEOkJeT3e5

What would be the right way to make the methods called in the transcluded 
contents to use the parent scope?


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