Release 4.3.1 (#18152) (#18154)

* fix(angular): support replaceUrl with angular <7.2 (#18106)

* fix(angular): support replaceUrl with angular <7.2

* run linter

* fix(): sanitize components using innerHTML (#18146)

* 4.3.1 (#18150)
This commit is contained in:
Liam DeBeasi
2019-04-26 15:52:30 -04:00
committed by GitHub
parent d12757f975
commit 9c2cd31b1c
6 changed files with 32 additions and 7 deletions

View File

@ -59,7 +59,22 @@ export class StackController {
}
const viewsSnapshot = this.views.slice();
const currentNavigation = this.router.getCurrentNavigation();
let currentNavigation;
const router = (this.router as any);
// Angular >= 7.2.0
if (router.getCurrentNavigation) {
currentNavigation = router.getCurrentNavigation();
// Angular < 7.2.0
} else if (
router.navigations &&
router.navigations.value
) {
currentNavigation = router.navigations.value;
}
/**
* If the navigation action
* sets `replaceUrl: true`