标签: javascript html angular checkbox
我有一个复选框,我想要一直检查,只有在我们愿意的情况下才能取消选中。
这是html
<input type="checkbox" class="custom-control-input" [(ngModel)]="productDetails.iscanRetrunable" name="iscanRetrunable" checked>
是因为我对它有约束力吗?
答案 0 :(得分:-1)
可行,但您必须将起始reduce绑定值初始化为true:
reduce
ngModel
see this example