Skip to content

Commit a12e839

Browse files
NgForOf replaced with native built-in control flow
1 parent 8b72497 commit a12e839

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/app/components/catalogs/catalogs.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<input matInput formControlName="constellation" type="text"
1717
[matAutocomplete]="constAuto">
1818
<mat-autocomplete #constAuto="matAutocomplete">
19-
<mat-option *ngFor="let abbr of filteredConstellations$ | async" [value]="abbr">
20-
{{ abbr }}
21-
</mat-option>
19+
@for (abbr of filteredConstellations$ | async; track abbr) {
20+
<mat-option [value]="abbr">{{ abbr }}</mat-option>
21+
}
2222
</mat-autocomplete>
2323
</mat-form-field>
2424

src/app/components/catalogs/catalogs.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { FormBuilder, FormGroup, FormsModule, ReactiveFormsModule } from '@angul
88
import { trigger, state, style, transition, animate } from '@angular/animations';
99
import { TopBarService } from '../../services/top-bar.service';
1010
import { MatTableModule } from '@angular/material/table';
11-
import { AsyncPipe, NgForOf } from '@angular/common';
11+
import { AsyncPipe } from '@angular/common';
1212
import { Observable } from 'rxjs';
1313
import { map, startWith } from 'rxjs/operators';
1414

@@ -68,7 +68,6 @@ interface LoadObjectsParams {
6868
MatSelectModule,
6969
MatCheckboxModule,
7070
MatAutocompleteModule,
71-
NgForOf,
7271
AsyncPipe,
7372
FormsModule,
7473
ReactiveFormsModule

0 commit comments

Comments
 (0)