angular material input disabled code example
Example 1: angular material input
Html
TS
import {Component} from '@angular/core';
/**
* @title Basic Inputs
*/
@Component({
selector: 'input-overview-example',
styleUrls: ['input-overview-example.css'],
templateUrl: 'input-overview-example.html',
})
export class InputOverviewExample {}
CSS
.example-form {
min-width: 150px;
max-width: 500px;
width: 100%;
}
.example-full-width {
width: 100%;
}
Example 2: mat input disabled
class YourComponent {
inputFormControl = new FormControl({ value: null, disabled: true });
this.inputFormControl.disable();
this.inputFormControl.enable();
}