Answers for "disabled select option angular"

1

angular disable select dropdown

Dropdown1: <select [(ngModel)]="dropdown1">
  <option value="">Select</option>
  <option value="1">1</option>
  <option value="2">2</option>
</select>
<br/>
Dropdown2: <select [(ngModel)]="dropdown2">
  <option value="">Select</option>
  <option value="1">1</option>
  <option value="2">2</option>
</select>
<br/>
Dropdown3: <select [(ngModel)]="dropdown3">
  <option value="">Select</option>
  <option value="1">1</option>
  <option value="2">2</option>
</select>

<br/>
<button [disabled]="!(dropdown1 && dropdown2 && dropdown3)">Save</button>
Posted by: Guest on January-13-2022
1

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 "disabled select option angular"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language