0
我是angular2新手。只有当我的复选框被点击时,我需要启用选择选项。单击复选框时启用选择选项
形式:
<tr *ngFor="let user of users">
<td>{{ user.id }}</td>
<td><input type="checkbox" name="switch" (click)="toggleSwitch(user.id, $event)"></td>
<td>
<select id="intensity" (change)="toggleOption(user.id, $event)" [disabled]="butDisabled">
<option *ngFor="let int of intensity" [value]="int" >{{int}}</option>
</select>
</td>
</tr>
组件:
export class UsersComponent {
butDisabled: boolean = true;
}
正如我告诉我是新来的角2,我无法找到正确的代码禁用/启用基于一个复选框选择选项。