import { NgMatFormOptions, NgMatFormFields, NgMatFormService } from 'ng-mat-forms';
// other imports here...
export class MyTestApp {
public ngMatFormsOptions: NgMatFormOptions = {
column: 3
// other options...
};
// Initialized a field list array which extended a field interface.
public ngMatFormFields: NgMatFormFields[] = [{
type: 'input',
label: 'User Name',
placeholder: 'Enter a User Name',
formControlName: 'name'
// other options...
}];
setDisable(): void {
//this.ngMatFormService.setControlEnable(formControlName);
this.ngMatFormService.setControlEnable('name');
}
constructor(private ngMatFormService:NgMatFormService) {}
}