fix(Router): Query strings are copied for HashLocationStrategy

b/27210802 P1

Closes #7298
This commit is contained in:
Misko Hevery
2016-02-25 16:18:55 -08:00
committed by Miško Hevery
parent ebd438ff5e
commit b47f80ec76
4 changed files with 30 additions and 6 deletions

View File

@ -69,12 +69,12 @@ export class HashLocationStrategy extends LocationStrategy {
// the hash value is always prefixed with a `#`
// and if it is empty then it will stay empty
var path = this._platformLocation.hash;
if (!isPresent(path)) path = '#';
// Dart will complain if a call to substring is
// executed with a position value that extends the
// length of string.
return (path.length > 0 ? path.substring(1) : path) +
normalizeQueryParams(this._platformLocation.search);
return (path.length > 0 ? path.substring(1) : path);
}
prepareExternalUrl(internal: string): string {