Skip to content
Advertisement

Tag: angular-ng-if

How to use the same template in ngIf

I have many conditions to show the same template. For example: Is it possible to take this html elements: and put somewhere and then just call this html elements by name/reference in *ngIf? For example: Answer Actually ngIf has a ‘cool’ attribute, then, that you could make use of: As <template> has been deprecated, use <ng-template> instead or <ng-container>. You

Advertisement