diff --git a/demos/component-docs/menus/menus.html b/demos/component-docs/app.html
similarity index 52%
rename from demos/component-docs/menus/menus.html
rename to demos/component-docs/app.html
index 3b8e627395..46e54adcd5 100644
--- a/demos/component-docs/menus/menus.html
+++ b/demos/component-docs/app.html
@@ -1,3 +1,7 @@
+
+
+
+
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/demos/component-docs/index.ts b/demos/component-docs/index.ts
index dd24b099bb..739e78193a 100644
--- a/demos/component-docs/index.ts
+++ b/demos/component-docs/index.ts
@@ -1,14 +1,12 @@
import {App, IonicApp, Platform, ActionSheet} from 'ionic/ionic';
import {Page, Config, Events} from 'ionic/ionic';
+import {PageOne, PageTwo, PageThree} from './menus/menus';
import {ActionSheetPage} from './actionSheet/actionSheet';
import * as helpers from './helpers';
@App({
- template: '
' +
- '
' +
- '' +
- '',
+ templateUrl: 'app.html',
})
class DemoApp {
@@ -20,6 +18,12 @@ class DemoApp {
this.platform = platform;
this.androidAttribute = helpers.AndroidAttribute;
+ this.pages = [
+ { title: 'Home', component: PageOne },
+ { title: 'Friends', component: PageTwo },
+ { title: 'Events', component: PageThree }
+ ];
+
this.platform.ready().then( () => {
window.addEventListener('message', (e) => {
zone.run(() => {
@@ -40,4 +44,14 @@ class DemoApp {
}
+ openPage(page) {
+ // close the menu when clicking a link from the menu
+ this.app.getComponent('leftMenu').close();
+
+ // Reset the content nav to have just this page
+ // we wouldn't want the back button to show in this scenario
+ let nav = this.app.getComponent('nav');
+ nav.setRoot(page.component);
+ }
+
}
diff --git a/demos/component-docs/menus/menu-events.html b/demos/component-docs/menus/menu-events.html
index efb9156834..820f07e200 100644
--- a/demos/component-docs/menus/menu-events.html
+++ b/demos/component-docs/menus/menu-events.html
@@ -1,6 +1,6 @@
-
+
@@ -11,5 +11,5 @@
-
+
diff --git a/demos/component-docs/menus/menu-home.html b/demos/component-docs/menus/menu-home.html
index 2f2bb969d3..ce27e4639e 100644
--- a/demos/component-docs/menus/menu-home.html
+++ b/demos/component-docs/menus/menu-home.html
@@ -1,6 +1,6 @@
-
+
@@ -11,6 +11,6 @@
-
-
+
+
diff --git a/demos/component-docs/menus/menu-places.html b/demos/component-docs/menus/menu-places.html
index e69de29bb2..da69ab63d4 100644
--- a/demos/component-docs/menus/menu-places.html
+++ b/demos/component-docs/menus/menu-places.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ Places
+
+
+
+
+
+
+
diff --git a/demos/component-docs/menus/menus.ts b/demos/component-docs/menus/menus.ts
index 2ebcd30fb2..c2a243317e 100644
--- a/demos/component-docs/menus/menus.ts
+++ b/demos/component-docs/menus/menus.ts
@@ -2,12 +2,20 @@ import {App, IonicApp, Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import * as helpers from '../helpers';
-
@Page({
templateUrl: 'menus/menu-home.html',
directives: [forwardRef(() => helpers.AndroidAttribute)]
})
-class PageOne{
+export class MenusPage{
+ constructor() {
+ }
+}
+
+@Page({
+ templateUrl: 'menus/menu-home.html',
+ directives: [forwardRef(() => helpers.AndroidAttribute)]
+})
+export class PageOne{
constructor() {
}
}
@@ -16,40 +24,12 @@ class PageOne{
templateUrl: 'menus/menu-friends.html',
directives: [forwardRef(() => helpers.AndroidAttribute)]
})
-class PageTwo{
+export class PageTwo{
}
@Page({
templateUrl: 'menus/menu-events.html',
directives: [forwardRef(() => helpers.AndroidAttribute)]
})
-class PageThree{
-}
-
-@Page({
- templateUrl: 'menus/menus.html',
- directives: [forwardRef(() => helpers.AndroidAttribute)]
-})
-export class MenusPage {
-
- constructor(app: IonicApp) {
- this.app = app;
- this.rootPage = PageOne;
- this.pages = [
- { title: 'Home', component: PageOne },
- { title: 'Friends', component: PageTwo },
- { title: 'Events', component: PageThree }
- ];
-
- }
-
- openPage(menu, page) {
- // close the menu when clicking a link from the menu
- this.app.getComponent('leftMenu').close();
-
- // Reset the content nav to have just this page
- // we wouldn't want the back button to show in this scenario
- let nav = this.app.getComponent('menuNav');
- nav.setRoot(page.component);
- }
+export class PageThree{
}