Hello i have an ionic app where i am trying to disable the ion-input using reactive forms some thing like this.
Disable(){
this.name.disable();
this.name.updateValueAndValidity();
}
And When i try to enable the input element its not working
Enable(){
this.name.enable();
this.name.updateValueAndValidatity();
}
The html code looks like this:
<ion-item>
<ion-input type="text" [formControl]="name"></ion-input>
</ion-item>
<button ion-button (click)="Disable()">Disable</button>
<button ion-button (click)="Enable()">Enable</button>
The above code works fine with html5 input element but not with ionic elements.Can somebody please tell is there something i am missing.I have made a demo example here:https://stackblitz.com/edit/ionic-nl1hi3?file=pages%2Fhome%2Fhome.html