Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 231353

How to disable a button on a condition?

$
0
0

This perhaps is a better way to disable a button via js. If your button is part of a component, use

<button [disabled]="buttonDisabled">

and in the component class use

this.buttonDisabled = true;

to disable, or

this.buttonDisabled = false;

to enable.

This works now in Ionic version 2.0.0-alpha.57


Viewing all articles
Browse latest Browse all 231353

Latest Images

Trending Articles



Latest Images