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
  • 47,821
  • 12
  • 98
  • 113
aleclofabbro
  • 1,563
  • 15
  • 33

0 Answers0