📜  使用 formbuilder 禁用控制 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:18.082000             🧑  作者: Mango

代码示例2
this.userProfileForm = this.formBuilder.group({
  // ...
  password: [{
    value: null,
    disabled: !this.isResetPassword
  }],
  newPassword: [{
    value: null,
    disabled: !this.isResetPassword
  }],
  reTypePassword: [{
    value: null,
    disabled: !this.isResetPassword
  }]
});