import {IonicApp, IonicView, NavController} from 'ionic/ionic'; import {SinkPage} from '../sink-page'; @IonicView({ template: ` Buttons

Buttons

The faithful button. Not only our favorite place to click, but a true friend.

Buttons come in lots of different colors:

various shapes:

and with different embellishments:

CLICKED

` }) export class ButtonPage extends SinkPage { constructor(app: IonicApp, nav: NavController) { super(app); this.nav = nav; } onButtonClick(event) { console.log('On button click', event); clearTimeout(this.clickTimeout); this.clicked = true; this.clickTimeout = setTimeout(() => { this.clicked = false; }, 500); } }