Answers for "html if else angular"

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
0

ngif else

<div *ngIf="isValid;else other_content">
    content here ...
</div>

<ng-template #other_content>other content here...</ng-template>
Posted by: Guest on August-14-2021

Browse Popular Code Answers by Language