Answers for "ngif html"

12

ngif else

<div *ngIf="isLoggedIn; else loggedOut">
  Welcome back, friend.
</div>

<ng-template #loggedOut>
  Please friend, login.
</ng-template>
Posted by: Guest on April-01-2020
1

angular ngif

<label *ngIf="1==1" > show Label when condition is true </label>
Posted by: Guest on September-22-2021
1

ng if

<ng-template [ngIf]="heroes" [ngIfElse]="loading">
 <div class="hero-list">
  ...
 </div>
</ng-template>

<ng-template #loading>
 <div>Loading...</div>
</ng-template>
Posted by: Guest on September-30-2020

Browse Popular Code Answers by Language