diff --git a/src/navigation/nav-controller-base.ts b/src/navigation/nav-controller-base.ts index 8a8be94b799..9da552d677d 100644 --- a/src/navigation/nav-controller-base.ts +++ b/src/navigation/nav-controller-base.ts @@ -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; diff --git a/src/navigation/nav-controller.ts b/src/navigation/nav-controller.ts index b6db46d7f18..0f02e0f0eb7 100644 --- a/src/navigation/nav-controller.ts +++ b/src/navigation/nav-controller.ts @@ -590,10 +590,16 @@ export abstract class NavController implements NavigationContainer { abstract getViews(): Array; /** - * 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}