我有一个包含1个字符长字段的表,该字段由*ngFor从二维数组生成,定义为: <tr *ngFor="let row of table; index as i"><td *ngFor="let field of row; index as j">
<input type="text" [(ngModel)]="table[i][j]" type="text&qu
matAutocomplete]="auto" [formControl]="stateCtrl"> <mat-option *ngForNgFor only supports binding to Iterables such as Arrays.
注意,e是我在搜索字段中键入的内容。我从服务器获得的响应是一个包含对象的数组。
我在使用从API中获取随机用户的按钮时遇到了问题。当检索所有用户时,显示信息时没有任何问题,但是当随机选择一个用户时,它不起作用。此外,它不会在每次都随机化,它只是作为一个用户。NgFor only supports binding to Iterables such as Arrays. service file randomNumber = Math.floor(Math.random_httpClient.get(`${this.placeholderApi}/users/${t