From afbb9324816440b20f61a3fc93cea93b1275a053 Mon Sep 17 00:00:00 2001
From: Max Lynch
Date: Thu, 4 Jun 2015 10:47:11 -0500
Subject: [PATCH] BGutton click
---
.../components/app/test/sink/pages/button.js | 19 ++++++++++++++++---
.../app/test/sink/pages/table-search.js | 2 +-
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/ionic/components/app/test/sink/pages/button.js b/ionic/components/app/test/sink/pages/button.js
index 0b948e11f2..6549817721 100644
--- a/ionic/components/app/test/sink/pages/button.js
+++ b/ionic/components/app/test/sink/pages/button.js
@@ -1,4 +1,4 @@
-import {NgFor} from 'angular2/angular2';
+import {NgFor, NgIf} from 'angular2/angular2';
import {Ancestor} from 'angular2/src/core/annotations_impl/visibility';
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@@ -23,7 +23,7 @@ import {Routable, NavbarTemplate, Navbar, NavController, Button, Content} from '
and those that flow inline), and shapes.
+
@@ -31,17 +31,30 @@ import {Routable, NavbarTemplate, Navbar, NavController, Button, Content} from '
+
+ CLICKED
+
`,
- directives: [NavbarTemplate, Navbar, Content, Button]
+ directives: [NavbarTemplate, Navbar, Content, Button, NgIf]
})
export class ButtonPage {
constructor(nav: NavController) {
this.nav = nav;
window.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, {
diff --git a/ionic/components/app/test/sink/pages/table-search.js b/ionic/components/app/test/sink/pages/table-search.js
index 3616094fe1..9ab2b4a37c 100644
--- a/ionic/components/app/test/sink/pages/table-search.js
+++ b/ionic/components/app/test/sink/pages/table-search.js
@@ -10,7 +10,7 @@ import {Segment, SegmentButton, SearchBar, List, Item, ActionMenu, Modal, ModalR
console.log(NavbarTemplate, Navbar, Content, formDirectives);
function randomTitle() {
- var items = ['Pizza', 'Pumpkin', 'Apple', 'Bologna'];
+ var items = ['Pizza', 'Pumpkin', 'Apple', 'Bologna', 'Durian', 'Banana', 'Meat pie'];
return items[Math.floor(Math.random() * items.length)];
}