<ng-template>
It’s a template element that Angular uses with structural directives (*ngIf, *ngFor, [ngSwitch] and custom directives).
These template elements only work in the presence of structural directives. Angular wraps the host element (to which the directive is applied) inside <ng-template> and consumes the <ng-template> in the finished DOM by replacing it with diagnostic comments.
Resources

