If Else statement in Angular 4 can be written using following syntax-
Open /src/app/app.components.ts:
Export class AppComponent {
Title – ‘app works!;
}

Open /src/app/app.component.html
<div *ngIf = “ title; else login”>
The user is logged in. </div>
<ng-template #login> in order to login pleae continue. </ng-template>
Then statement can be write using following syntax-
<div *ngIf = “title; then logout else login “> </div>
<ng-template #login> please login to continue . </ng-template>
<ng-template #logout> Hi abc, <button> logout now </button> . </ng-template>
BY Best Interview Question ON 01 Sep 2019