1

Let's say you have 2 directives:

<navigation-extended>
    <navigation /> 
</navigation-extended>

navigation-extended html template uses transclude property on a div to insert the basic navigation. Besides that, navigation-extended contains extra html (controls to navigate).

What is the best way to access child functionalities from inside the parent directive?

Things I've tried: -require ->using this I was able to access navigation-extended methods from inside navigation but not the other way around

Vincent
  • 6,058
  • 15
  • 52
  • 94
  • I think the best way to achieve this is using `$broadcast` to fire an event in the parent directive and using `$on` to handle it in the child directive, for more info about this check this answer https://stackoverflow.com/a/14502755/158421 – Mohammad Shahrouri Oct 23 '14 at 09:36

0 Answers0