Angular中 选择改变事件的方法
- HTML:
<div class="set-select">
<label for="rankbutton">筛选平台</label>
<select id="rankbutton" [(ngModel)]="platform" (ngModelChange)="set_platform()">
<select id="rankbutton" [(ngModel)]="platform">
<option *ngFor="let item of platforms" [value]='item.key'>{
{item.value}}</option>
</select>
</div>
- ts
platform = 'wx';
platforms: any = [
{
key