From 0b2d636b75d69e17bff2eb875181a2a6242e1abb Mon Sep 17 00:00:00 2001 From: vsavkin Date: Mon, 27 Nov 2017 13:06:09 -0500 Subject: [PATCH] fix(router): replaceURL when reacting to a change coming from angularjs Closes: #20549 --- packages/router/upgrade/src/upgrade.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router/upgrade/src/upgrade.ts b/packages/router/upgrade/src/upgrade.ts index 40e399e6b0..5bcfa566b8 100644 --- a/packages/router/upgrade/src/upgrade.ts +++ b/packages/router/upgrade/src/upgrade.ts @@ -81,6 +81,6 @@ export function setUpRouterSync(injector: Injector, $injector: any) { $injector.get('$rootScope').$on('$locationChangeStart', (_: any, next: string, __: string) => { url.href = next; - router.navigateByUrl(url.pathname + url.search + url.hash); + router.navigateByUrl(url.pathname + url.search + url.hash, {replaceUrl: true}); }); } \ No newline at end of file