Files
Brandy Carney 0827f97464 docs(demos): update menu API demo to use multiple menus
This is actually the same as the ID demo but I figured I would keep
them separate in case we decide to do something different in them.

references driftyco/ionic-site#397
2016-02-04 14:40:23 -05:00

30 lines
625 B
TypeScript

import {App, IonicApp, Page} from 'ionic/ionic';
@Page({templateUrl: 'page1.html'})
class Page1 {
constructor(app: IonicApp) {
this.app = app;
this.menu1Active();
}
menu1Active() {
this.activeMenu = 'menu1';
this.app.getComponent('menu1').enable(true);
this.app.getComponent('menu2').enable(false);
}
menu2Active() {
this.activeMenu = 'menu2';
this.app.getComponent('menu1').enable(false);
this.app.getComponent('menu2').enable(true);
}
}
@App({
templateUrl: 'main.html'
})
class ApiDemoApp {
constructor(app: IonicApp) {
this.app = app;
this.rootView = Page1;
}
}