Reputation: 95
Is it possible to remove comments that makes the DOM "*ngIf" or "*ngFor" AngularJS2 when there isn't an element to render?
Maybe it's possible to set this up somewhere and not know. I would have the DOM as clean as possible and not see comments like this:
<!--template bindings={}-->
Upvotes: 5
Views: 1563
Reputation: 657108
They are placeholders so Angular knows where to render elements. For example when the collection you refer to is empty and then add data Angular needs to know where to render the first template item.
Upvotes: 2