import {Component, View, NgIf} from 'angular2/angular2';
import {IonicApp, Routable, NavbarTemplate, Navbar, NavController, Content} from 'ionic/ionic';
import {SinkPage} from '../sink-page';
@Component({
selector: 'ion-view'
})
@View({
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
`,
directives: [NavbarTemplate, Navbar, Content, NgIf]
})
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);
}
}
new Routable(ButtonPage, {
url: '/components/button',
tag: 'button'
})