Answers for "ng-disabled in angular 8"

1

how to disable a div in angular

<div [ngClass]="{'class1': condition,}"></div>

// your .css file
.disable{
  pointer-events:none;
}
Posted by: Guest on January-04-2021
3

ng-select disabled

// 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();
Posted by: Guest on June-19-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language