disabled attribute with function is not working in IE11. It remains disable all the time. Please refer below code:
HTML:
<button type="submit" (click)="onSubmit()" [disabled]="!isValid()">SAVE</button>
Component (.ts)
isValid(){
return this.providedId != null;
}
Try working with a getter
, so you won't need the parentheses inside the template:
get isValid(){
return this.providedId != null;
// Or any other complicated logic...
}
And the template without the parentheses:
<button [disabled]="!isValid">SAVE</button>