假设数据是这样的。。objList = [{name:"jack",age:23},{name:"lucy",24}]
<select class="form-control" (change)="selected($event)">
<option *ngFor="let obj of objList" value="{{obj.Value}}">{{obj.Name}}</option>
</select>
selected($event){
}
选择lucy的option时,selected方法怎么拿到当前option的对象集合?即:{name:"lucy",24}
阿晨1998
相关分类