ng-template
tag. This allows us to run some code that decides what the final rendered output will be. Angular has a few built-in structural directives such as ngIf
, ngFor
, and ngSwitch
.ng-template
tag. Internally, Angular translates the *ngIf
attribute into a <ng-template>
element, wrapped around the host element, as seen here: