From 2f977312be6167d6463a74e0aa996c53c716b28a Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Fri, 21 Apr 2017 11:08:40 -0700 Subject: [PATCH] fix(router): forward the query parameters in the ng1 -> ng2 url sync (#16249) fixes #16067 PR Close #16249 --- 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 123327ba9c..12b511000e 100644 --- a/packages/router/upgrade/src/upgrade.ts +++ b/packages/router/upgrade/src/upgrade.ts @@ -71,6 +71,6 @@ export function setUpLocationSync(ngUpgrade: UpgradeModule) { ngUpgrade.$injector.get('$rootScope') .$on('$locationChangeStart', (_: any, next: string, __: string) => { url.href = next; - router.navigateByUrl(url.pathname); + router.navigateByUrl(url.pathname + url.search); }); }