0

角度4介绍compareWith指令来比较options来选择。compareWith指令中角度4

<select [compareWith]="byUId" [(ngModel)]="selectedUsers"> 
    <option *ngFor="let user of users" [ngValue]="user.UId">{{user.name}}</option> 
</select> 

这仅适用于select控制?或者是否可以使用其他控件?如果是的话,那该怎么办呢?

回答