Skip to content

Commit

Permalink
fix(navigation): restore getActiveChildNav method to maintain old API…
Browse files Browse the repository at this point in the history
…, add deprecation notice
  • Loading branch information
danbucholtz committed Jul 6, 2017
1 parent efd5475 commit d22d77b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/navigation/nav-controller-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 7 additions & 1 deletion src/navigation/nav-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit d22d77b

Please sign in to comment.