Why using AngularJS directive in comments
2 answers
One use case, from the Docs :
Best practice: . Comment directives were commonly used in places where the DOM API restricts the ability to create directives that span multiple elements (for example, inside elements
<table>
). AngularJS 1.2 introducesng-repeat-start
andng-repeat-end
as the best solution for this problem. Developers are encouraged to use this by special comment whenever possible.
The "M" constraint is the least commonly used, typically only for backward compatibility and to pass markup validation.
+3
source to share