Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| 56-tools:angular [2018/04/08 20:41] – [Template reference variables ( #var )] Roge | 56-tools:angular [2018/04/08 20:48] (Version actuelle) – [*ngFor] Roge | ||
|---|---|---|---|
| Ligne 79: | Ligne 79: | ||
| ===== Directives structurelles ===== | ===== Directives structurelles ===== | ||
| - | ==== NgFor ==== | + | ==== *ngIf ==== |
| + | |||
| + | Micro syntax: | ||
| + | < | ||
| + | <div *ngIf=" | ||
| + | </ | ||
| + | |||
| + | Equivallent full syntax: | ||
| + | < | ||
| + | < | ||
| + | <div class=" | ||
| + | </ | ||
| + | </ | ||
| + | ==== *ngFor | ||
| Micro code: | Micro code: | ||
| Ligne 93: | Ligne 106: | ||
| <div [class.odd]=" | <div [class.odd]=" | ||
| </ | </ | ||
| + | </ | ||
| + | |||
| + | ==== ngSwitch | ||
| + | |||
| + | Micro code: | ||
| + | < | ||
| + | <div [ngSwitch]=" | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Equivalent full syntax: | ||
| + | < | ||
| + | <div [ngSwitch]=" | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| </ | </ | ||
| ===== Input and Output properties ===== | ===== Input and Output properties ===== | ||