| Start |
|---|
| To run a function at the start or end of *ngFor loop Using *ngIf NgFor provides Some values that can be aliased to local variables
|
| Display a loading message If our component is not ready and waiting for data from server, then we can add loader using *ngIf. Steps: First declare a boolean: Next, in your component add a lifecycle hook called and after you get complete data from server set you loading boolean to false. In your html template use *ngIf with the |
Show Alert Message on a condition |
| Use ngIf withngFor While you are not allowed to use Example 1: General syntax Example 2: Display elements with even index The downside is that an additional outer But consider this use case where a This way adding an additional outer Note: In Angular v4 Syntax
|
Read Article
https://develop.horje.com/learn/1434/reference