如果给出了trackBy,Angular 就会使用该函数的返回值来跟踪变化。 来个例子: ... <a (click)="add()">添加</a> <ul> <li *ngFor="let i of arr; index as ii; ...
確定! 回上一頁