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:43] – [NgFor] Roge | 56-tools:angular [2018/04/08 20:48] (Version actuelle) – [*ngFor] Roge | ||
|---|---|---|---|
| Ligne 81: | Ligne 81: | ||
| ==== *ngIf ==== | ==== *ngIf ==== | ||
| + | Micro syntax: | ||
| + | < | ||
| + | <div *ngIf=" | ||
| + | </ | ||
| - | <p *ngIf="true"> | + | Equivallent full syntax: |
| - | | + | < |
| - | This paragraph is in the DOM. | + | <ng-template [ngIf]="hero"> |
| - | </p> | + | |
| + | </ng-template> | ||
| + | </ | ||
| ==== *ngFor ==== | ==== *ngFor ==== | ||
| Ligne 101: | 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 ===== | ||