What is ngFor and ngIf is and when do we use it.
Hi rani,
ngFor is a structural directive of Angular which replaces the ng-repeat attribute of AngularJS.
Refer below links.
https://blog.angular-university.io/angular-2-ngfor/
https://stackoverflow.com/questions/35498498/what-is-the-meaning-of-in-ngfor-in-angular2
https://stackoverflow.com/questions/43388893/what-is-the-difference-between-ngfor-and-ngforof-in-angular2
ngIf will comment out the data if the expression is false. This way the data are not even loaded causing HTML to load faster.
https://docs.angularjs.org/api/ng/directive/ngIf
https://stackoverflow.com/questions/19177732/what-is-the-difference-between-ng-if-and-ng-show-ng-hide
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.