fix(tabs): preserve route navigation extras when changing tabs (#18493)

fixes #18717
This commit is contained in:
James Manners
2019-12-12 02:46:14 +11:00
committed by Liam DeBeasi
parent b3b3312711
commit 4c8f32fae9
5 changed files with 174 additions and 13 deletions

View File

@ -70,7 +70,7 @@ export class StackController {
if (router.getCurrentNavigation) {
currentNavigation = router.getCurrentNavigation();
// Angular < 7.2.0
// Angular < 7.2.0
} else if (
router.navigations &&
router.navigations.value
@ -191,6 +191,14 @@ export class StackController {
return views.length > 0 ? views[views.length - 1] : undefined;
}
/**
* @internal
*/
getRootUrl(stackId?: string) {
const views = this.getStack(stackId);
return views.length > 0 ? views[0] : undefined;
}
getActiveStackId(): string | undefined {
return this.activeView ? this.activeView.stackId : undefined;
}