Monday, January 24, 2022

How to disable mat text box filed in angular

 How to disable mat form filed in angular.


isDisableField: boolean = true;

In html need add [readonly] = "isDisableField"

in CSS: 

.disable-field {

pointer-events: none;

.mat-form-field-flex {
background--color: gray;
}
.mat-form-field-outline {
display : none;
}

}

No comments:

Post a Comment