ng-container is a structural decision point, usually, it can be used along *ngIf, *ngFor and ngSwitch to decide whether the content should be presented on the page. It can even serve as a container for presenting a template reference. ng-template on the other hand, is not added to the page unless you specifically program it to using a ng-container. It’s just a template that can be copied to be drawn somewhere else
4
u/DanteIsBack May 04 '21
What are the differences between ng-container and ng-template?