fix(angular): proxies

This commit is contained in:
Manu Mtz.-Almeida
2018-03-30 22:33:58 +02:00
parent cece447092
commit 230823915c
7 changed files with 276 additions and 74 deletions

View File

@ -1,8 +1,7 @@
import { NavOptions, ViewState } from './nav-util';
import { NavControllerBase } from './nav';
import { assert } from '../../utils/helpers';
import { FrameworkDelegate } from '../..';
import { FrameworkDelegate, Nav } from '../..';
import { attachComponent } from '../../utils/framework-delegate';
/**
@ -27,7 +26,7 @@ export class ViewController {
private _cntDir: any;
private _leavingOpts: NavOptions;
_nav: NavControllerBase;
nav: Nav;
_state: ViewState = ViewState.New;
/** @hidden */
@ -52,17 +51,6 @@ export class ViewController {
}
}
_setNav(navCtrl: NavControllerBase) {
this._nav = navCtrl;
}
/**
* @hidden
*/
getNav(): NavControllerBase {
return this._nav;
}
/**
* @hidden
*/
@ -115,7 +103,7 @@ export class ViewController {
element.remove();
}
}
this._nav = this._cntDir = this._leavingOpts = null;
this.nav = this._cntDir = this._leavingOpts = null;
this._state = ViewState.Destroyed;
}
@ -124,7 +112,7 @@ export class ViewController {
* @returns {number} Returns the index of this page within its `NavController`.
*/
get index(): number {
return (this._nav ? this._nav.indexOf(this) : -1);
return (this.nav ? this.nav.indexOf(this) : -1);
}
}