Skip to content

Commit f2df367

Browse files
authored
Merge pull request #4 from Muromi-Rikka/master
docs: update angular template syntax in readme files
2 parents bb297e8 + 59b21ff commit f2df367

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,15 +580,19 @@ WeekEnum.raw('Sunday').active; // true
580580

581581
```html
582582
<mat-select>
583-
<mat-option *ngFor="let item of WeekEnum.items" [value]="item.value">{{ item.label }}</mat-option>
583+
@for (item of WeekEnum.items; track item.value) {
584+
<mat-option [value]="item.value">{{ item.label }}</mat-option>
585+
}
584586
</mat-select>
585587
```
586588

587589
[NG-ZORRO](https://ng.ant.design/components/select/zh) Select
588590

589591
```html
590592
<nz-select>
591-
<nz-option *ngFor="let item of WeekEnum.items" [nzValue]="item.value">{{ item.label }}</nz-option>
593+
@for (item of WeekEnum.items; track item.value) {
594+
<nz-option [nzValue]="item.value">{{ item.label }}</nz-option>
595+
}
592596
</nz-select>
593597
```
594598

README.zh-CN.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,15 +579,19 @@ WeekEnum.raw('Sunday').active // true
579579

580580
```html
581581
<mat-select>
582-
<mat-option *ngFor="let item of WeekEnum.items" [value]="item.value">{{ item.label }}</mat-option>
582+
@for (item of WeekEnum.items; track item.value) {
583+
<mat-option [value]="item.value">{{ item.label }}</mat-option>
584+
}
583585
</mat-select>
584586
```
585587

586588
[NG-ZORRO](https://ng.ant.design/components/select/zh) Select
587589

588590
```html
589591
<nz-select>
590-
<nz-option *ngFor="let item of WeekEnum.items" [nzValue]="item.value">{{ item.label }}</nz-option>
592+
@for (item of WeekEnum.items; track item.value) {
593+
<nz-option [nzValue]="item.value">{{ item.label }}</nz-option>
594+
}
591595
</nz-select>
592596
```
593597

0 commit comments

Comments
 (0)