Files
Brandy Carney 05c7b8f0d7 docs(demos): update API demos so they all have ion-navs
- add spacing between imports
- alphabetize imports
- removed app.html files in favor of an inline ion-nav
- cleaned up config demo so it uses proper syntax
- use file name main.html for the first page for the demo
- name the app ApiDemoApp and first page ApiDemoPage
- replace the ion-toolbars with ion-navbars

closes #7019
closes driftyco/ionic-site#647
2016-06-22 14:45:49 -04:00

36 lines
643 B
TypeScript

import { Component } from '@angular/core';
import { ionicBootstrap, MenuController } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
class ApiDemoPage {
activeMenu: string;
constructor(public menu: MenuController) {
this.menu1Active();
}
menu1Active() {
this.activeMenu = 'menu1';
this.menu.enable(true, 'menu1');
this.menu.enable(false, 'menu2');
}
menu2Active() {
this.activeMenu = 'menu2';
this.menu.enable(false, 'menu1');
this.menu.enable(true, 'menu2');
}
}
@Component({
templateUrl: 'app.html'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);