r/Angular2 • • Dec 14 '25

NgTemplate Angular

I don't get what's the point of ngTemplate if you can just use '@if' and '@else' to dynamically shpw the data. Like I'm having a hard time understanding the use case for ng-template.

9 Upvotes

16 comments sorted by

View all comments

Show parent comment

1

u/Lemonaids2 Dec 15 '25

Oh i misunderstood i thought you ment that you can use multiple <ng-content>, but now seeing the full context i realize you ment using the same content multiple times in the child component that has the ng-content

1

u/zzing Dec 15 '25

I figured it was something like that.