mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(navigation): restore getActiveChildNav method to maintain old API, add deprecation notice
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user