1

Check this plunk... the my-dir directive adds an ng-model directive bound to a new scope property and recompiles. my-dir obviously removes itself's attribute to avoid infinite-loop. It works well except for: If the element has other directives (e.g. ng-click, in the plunk) it gets compiled twice, doubling it's effects. Is there a way to "compile my-dir firsts and stop!", or wahtever to avoid the issue ?

Khanh TO
  • 48,509
  • 13
  • 99
  • 115
aleclofabbro
  • 1,635
  • 1
  • 18
  • 35

0 Answers0