如果没有检查其他输入,我会尝试使用Angular来更新具有某个类的所有输入值。
HTML:
<input type="checkbox" class="form-optional" ng-model="user.diffPhysicalLegal" name="diff-physical-legal" ng-change="inputReset()"> My Legal Business Name and/or Legal Business Address are different.
如果选中或不选中复选框,则自动完成垫的值需要更改。未选中复选框时,“自动完成”应显示活动程序。当选中复选框时,自动完成应该显示不活动的程序。
我所看到的问题的步骤是:
1)不选中复选框
2)开始键入字母以查看活动程序
3) backspace all the letters typed
4) check the checkbox
5) start typing letters and I still see the list of active programs whereas I should see the inactive Programs
这就好像我需要在选中或取消复选框后将f
在angular中有没有办法检查表单控件是否被禁用? this.form.get("nationality").disable() 已禁用此控件。 是否可以检查此控件在重置方法时是否被禁用。如果禁用,则不需要重置该值。 我怎么才能检查它。 onReset(){
if(this.form.get("nationality").isDisable()){// its wrong
let name =this.form.get("nationality").value;
}else{
let name = null;
}
this.form.re