javascript - Does ng-transclude stop event propagation in Angular.js? -


The issue occurs when I try to send an event to nested directive through the $ scope object from my instruction. Like the $ scope.broadcast ('Event') The child does not receive the instruction, but when I use the $ root scope object it works Example: $ rootScope.broadcast (' Event ') .

TL; DR : Why does not it work: when it works:

Edit: angular.js version 1.3.0 and now this is not an issue!

Your instructions (s) ng-transclude From the docs:

The widget creates a separate scope in a specific setup, but transit is not a child, but is a brother of a separate scope.

This looks like your radius hierarchy:

Scope hierarchy

  • 003 Directive one
  • 004 is a separate scope, where there is an integration area where two Elements Live
  • 005 First Directional Two
  • 006 is the scope of the first director's area of ​​the area two

    You can see that the two is not the child of a .

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -