make some NavController methods private

This commit is contained in:
Tim Lancina
2015-10-08 19:17:50 -05:00
parent 0ef061c232
commit 79185044f3

View File

@ -188,7 +188,7 @@ export class NavController extends Ion {
let enteringView = new ViewController(this, componentType, params); let enteringView = new ViewController(this, componentType, params);
// add the view to the stack // add the view to the stack
this.add(enteringView); this._add(enteringView);
if (this.router) { if (this.router) {
// notify router of the state change // notify router of the state change
@ -253,12 +253,13 @@ export class NavController extends Ion {
} }
/** /**
* @private
* Pop to a specific view in the history stack * Pop to a specific view in the history stack
* *
* @param view {Component} to pop to * @param view {ViewController} to pop to
* @param opts {object} pop options * @param opts {object} pop options
*/ */
popTo(view, opts = {}) { _popTo(view, opts = {}) {
// Get the target index of the view to pop to // Get the target index of the view to pop to
let viewIndex = this._views.indexOf(view); let viewIndex = this._views.indexOf(view);
@ -383,7 +384,7 @@ export class NavController extends Ion {
viewCtrl.shouldCache = false; viewCtrl.shouldCache = false;
// add the item to the stack // add the item to the stack
this.add(viewCtrl); this._add(viewCtrl);
} }
} }
} }
@ -749,7 +750,7 @@ export class NavController extends Ion {
}); });
destroys.forEach(view => { destroys.forEach(view => {
this.remove(view); this._remove(view);
view.destroy(); view.destroy();
}); });
@ -873,11 +874,12 @@ export class NavController extends Ion {
} }
/** /**
* @private
* TODO * TODO
* @param {TODO} view TODO * @param {TODO} view TODO
* @returns {TODO} TODO * @returns {TODO} TODO
*/ */
add(view) { _add(view) {
this._incrementId(view); this._incrementId(view);
this._views.push(view); this._views.push(view);
} }
@ -887,11 +889,12 @@ export class NavController extends Ion {
} }
/** /**
* @private
* TODO * TODO
* @param {TODO} viewOrIndex TODO * @param {TODO} viewOrIndex TODO
* @returns {TODO} TODO * @returns {TODO} TODO
*/ */
remove(viewOrIndex) { _remove(viewOrIndex) {
util.array.remove(this._views, viewOrIndex); util.array.remove(this._views, viewOrIndex);
} }