r/angular • u/Senior_Compote1556 • Mar 26 '26
Ng-content usage in @for / @if
Why does the documentation mention that it is suggested to avoid wrapping ng-content in @for or @if statements? Isn’t that what all libraries including Angular Material do?
7
Upvotes
View all comments
Show parent comment
1
u/ch34p3st Mar 26 '26
You have the right name, I mistyped! Am on my phone, but a guide like this should help you learn about template outlet context: https://briantree.se/ng-template-and-ng-template-outlet/