📜  ng-select disabled - TypeScript 代码示例

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

代码示例1
// If you are using the Angular reactive form and trying to disable the ng-select using the following code then sorry it will not work in some case. If you are using formControlName then it will not work but work in [(ngModel)] case.

[disabled] = true

// The best way to do this is by using reactive form control.

this.createReactiveform.controls['some_key'].disable();