fix(navigation): restore getActiveChildNav method to maintain old API, add deprecation notice

This commit is contained in:
Dan Bucholtz
2017-07-05 23:45:38 -05:00
parent efd54750bf
commit d22d77b485
2 changed files with 15 additions and 1 deletions

View File

@@ -1191,6 +1191,14 @@ export class NavControllerBase extends Ion implements NavController {
getSecondaryIdentifier(): string {
return null;
}
/**
* Returns the active child navigation.
*/
getActiveChildNav(): any {
console.warn('(getActiveChildNav) is deprecated and will be removed in the next major release. Use getActiveChildNavs instead.');
return this._children[this._children.length - 1];
}
}
let ctrlIds = -1;

View File

@@ -590,10 +590,16 @@ export abstract class NavController implements NavigationContainer {
abstract getViews(): Array<ViewController>;
/**
* Returns the active child navigation.
* Returns a list of the active child navigation.
*/
abstract getActiveChildNavs(): any[];
/**
* Returns the active child navigation.
*/
abstract getActiveChildNav(): any;
/**
* Returns if the nav controller is actively transitioning or not.
* @return {boolean}