Using *ngif Angular Example Code (structural Directives)
- Forums
- Angular
- Using *ngif Angular Example Code (structural Directives)
this page shows an example of how to use angular ngif directive [4637], Last Updated: Mon Jun 24, 2024
Angular2
Tue Jan 31, 2017
0 Comments
425 Visits
ngIf Example
<div *ngIf="selectedHero">
according to the offical angular website, ngIf and ngFor are “structural directives†because they can change the structure of portions of the DOM. In simple words, they give structure to the way Angular shows content in the DOM