I'm trying to disable an input depending on the value taken from the Component.ts
In my component.ts file I have this value
disName = false;
And in my HTML I have these elements
Name: <input type="text"
value="name"
size="15"
id="name"
name="firstName"
[(ngModel)]="aproverFirstName"
[attr.disable]="disName=='true' ? true : null">
What looking for is that if my value on the component.ts is false, then in the html file the input element should change to disable depending on the value.
I've also tried this [disable]="disName"
I'm using Angular 7, thanks a lot!
[attr.disable]="disName ? true : null">(not put =='true')disabled, notdisable