fix(router): encode URLs the same way AngularJS did (closer to spec) (#17890)

fixes #16067
This commit is contained in:
Jason Aden
2017-07-06 17:10:25 -07:00
committed by GitHub
parent c69fff15c9
commit ae27af7399
3 changed files with 34 additions and 2 deletions

View File

@ -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 + url.search);
router.navigateByUrl(url.pathname + url.search + url.hash);
});
}