我有一个从ngFor循环和重置按钮生成的复选框列表.单击重置按钮时,如果选中任何复选框,我想取消选中它们.
这是我的HTML
<li *ngFor="let item of listItems" class="filter-list__item">
<label class="filter-list__itemLabel">
<input type="checkbox" value="{{item.id}}" [checked]="checked" />
<span innerHTML="{{item.name}}"></span>
</label>
</li>
<button (click)="resetAll()"></button>
Run Code Online (Sandbox Code Playgroud) angular ×1