0

I've a two directives with transcluding html which calls isolated scope.

This Plnkr works fine while templates are inline, but if I change template to templateURL, it stops work.

Are there any issues with compiling?

nateless
  • 475
  • 6
  • 23

1 Answers1

1

Loading the template use URL, Angularjs creates an additional transcluded scope I guess.

Try to use $$prevSibling.$$prevSibling to access the functions.

Btw, it is really hacky to use $$prevSibling.

<div authorization><a href="#" ng-click="$$prevSibling.$$prevSibling.modalToggle()">Sign in</a></div>
<div registration><a href="#" ng-click="$$prevSibling.$$prevSibling.modalToggle()">Registration</a></div>
zs2020
  • 53,766
  • 29
  • 154
  • 219