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

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 228598

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>