Does angular template supports if else?

Does angular template supports if else

Yes. New Version of Angular framework support if else
Let’s take an example. In the following code snippet, I am using Angular if else directive to showing the user is Admin or not.
Check the following example.$ads={1}
import { Component } from '@angular/core';

  selector: 'app-root',
  template: `
  <div  *ngIf="isAdmin; else elseBlock">
    Admin Area
<ng-template  #elseBlock>
  Normal User
  styles: []
export class AppComponent {
  isAdmin = true;

Next Post Previous Post
No Comment
Add Comment
comment url