Answers for "ng-if in html examples"

2

ng if

[ngClass]="{'my_class': step === 'step1', 'my_class2' : step === 'step2' }"
Posted by: Guest on April-27-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