mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
sidemenu
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import {bootstrap} from 'angular2/core';
|
||||
import {Component, Template} from 'angular2/angular2';
|
||||
import {Modal} from 'ionic/components/modal/modal';
|
||||
import {SideMenu, SideMenuParent} from 'ionic/components/sidemenu/sidemenu';
|
||||
import {Switch} from 'ionic/components/switch/switch';
|
||||
import {SideMenu, SideMenuParent} from 'ionic/components';
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {NgElement, Component, Template, Parent} from 'angular2/angular2';
|
||||
import {History} from '../../history';
|
||||
import {Ion} from '../ion';
|
||||
|
||||
|
||||
@@ -24,7 +25,7 @@ import {Ion} from '../ion';
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class Tabs extends Ion {
|
||||
export class Tabs extends View {
|
||||
|
||||
constructor(@NgElement() ele:NgElement) {
|
||||
ele.domElement.classList.add('view');
|
||||
@@ -36,6 +37,11 @@ export class Tabs extends Ion {
|
||||
add(tab) {
|
||||
this.tabs.push(tab);
|
||||
tab.show(this.tabs.length === 1);
|
||||
|
||||
}
|
||||
|
||||
selectTab(tab) {
|
||||
this.showHistory(tab.history);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -58,10 +64,11 @@ export class Tabs extends Ion {
|
||||
</div>
|
||||
`
|
||||
})
|
||||
export class Tab extends Ion {
|
||||
export class Tab extends View {
|
||||
|
||||
constructor(@NgElement() ele:NgElement, @Parent() tabs: Tabs) {
|
||||
this.ele = ele;
|
||||
this.history = new History();
|
||||
|
||||
ele.domElement.classList.add('view');
|
||||
ele.domElement.classList.add('tab-view');
|
||||
|
||||
@@ -6,6 +6,7 @@ export function IonConfig() {
|
||||
// TODO automatically add platform class
|
||||
// TODO do bindings/defaults have to be written twice?
|
||||
// TODO maybe add config to IonicComponent annotation
|
||||
// TODO map options to config
|
||||
function Config(instance) {
|
||||
util.defaults(instance, Config._defaults || {});
|
||||
var conditions = Config._conditions;
|
||||
|
||||
Reference in New Issue
Block a user