Answers for "ng if two conditions angularjs"

3

ngif using multiple elseif

<ng-container *ngIf="foo === 1;else second"></ng-container>
<ng-template #second>
    <ng-container *ngIf="foo === 2;else third"></ng-container>
</ng-template>
<ng-template #third></ng-template>
Posted by: Guest on October-05-2020
0

nested condition in *ngIf in angular

<ng-container *ngIf="(value1 || value2); else showDefault">
    <ng-container *ngIf="value3!=null && value4==null; else showValue4">
    </ng-container>
    <ng-template #showValue4>
    </ng-template>
</ng-container>
<ng-template #showDefault>
</ng-template>
Posted by: Guest on July-16-2021

Browse Popular Code Answers by Language