mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
ion-nav-pane
This commit is contained in:
@ -15,10 +15,11 @@ const CACHED_STATE = 'cached';
|
||||
|
||||
export class NavBase {
|
||||
|
||||
constructor(elementRef, loader, injector) {
|
||||
constructor(elementRef, loader, injector, compiler) {
|
||||
this.elementRef = elementRef;
|
||||
this.loader = loader;
|
||||
this.injector = injector;
|
||||
this.compile = compiler.compile;
|
||||
this.items = [];
|
||||
this.navCtrl = new NavController(this);
|
||||
this.sbTransition = null;
|
||||
@ -26,14 +27,9 @@ export class NavBase {
|
||||
this.domElement = elementRef.domElement;
|
||||
}
|
||||
|
||||
clear() {
|
||||
let pops = [];
|
||||
for(let item of this.items) {
|
||||
pops.push(this.pop({
|
||||
animate: false
|
||||
}));
|
||||
}
|
||||
return Promise.all(pops);
|
||||
templateAnchor(viewContainerRef, elementRef) {
|
||||
this.viewContainerRef = viewContainerRef;
|
||||
this.elementRef = elementRef;
|
||||
}
|
||||
|
||||
push(Component, params = {}, opts = {}) {
|
||||
@ -319,6 +315,16 @@ export class NavBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
clear() {
|
||||
let pops = [];
|
||||
for(let item of this.items) {
|
||||
pops.push(this.pop({
|
||||
animate: false
|
||||
}));
|
||||
}
|
||||
return Promise.all(pops);
|
||||
}
|
||||
|
||||
getActive() {
|
||||
for (let i = 0, ii = this.items.length; i < ii; i++) {
|
||||
if (this.items[i].state === ACTIVE_STATE) {
|
||||
|
Reference in New Issue
Block a user