Nov 13, 2021
Hey Mayank,
Thanks for the article. Good one!
For others who want to play around with the code example for Displaying Conditional Templates, try the following changes:
In app.component.html
<h1>Employee List is Given Below:</h1>
<ng-container *ngFor="let empName of employeeList">
<div *ngIf="empName !== name>
<h3>User Name is {{empName}}</h3>
<br />
</div>
</ng-container>
In app.component.ts
employeeList = ["Mayank", "Meha", "Anshul", "Aniket"];
Thanks!