docs(common): update ngFor docs to new as
syntax (#15166)
This commit is contained in:
@ -45,7 +45,7 @@ export class NgForOfContext<T> {
|
||||
* - `odd: boolean`: True when the item has an odd index in the iterable.
|
||||
*
|
||||
* ```
|
||||
* <li *ngFor="let user of userObservable | async as users; indexes as i; first as isFirst">
|
||||
* <li *ngFor="let user of userObservable | async as users; index as i; first as isFirst">
|
||||
* {{i}}/{{users.length}}. {{user}} <span *ngIf="isFirst">default</span>
|
||||
* </li>
|
||||
* ```
|
||||
@ -78,8 +78,8 @@ export class NgForOfContext<T> {
|
||||
*
|
||||
* ### Syntax
|
||||
*
|
||||
* - `<li *ngFor="let item of items; let i = index; trackBy: trackByFn">...</li>`
|
||||
* - `<li template="ngFor let item of items; let i = index; trackBy: trackByFn">...</li>`
|
||||
* - `<li *ngFor="let item of items; index as i; trackBy: trackByFn">...</li>`
|
||||
* - `<li template="ngFor let item of items; index as i; trackBy: trackByFn">...</li>`
|
||||
*
|
||||
* With `<ng-template>` element:
|
||||
*
|
||||
|
Reference in New Issue
Block a user