We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f7ebde commit c177d88Copy full SHA for c177d88
modules/angular2/src/router/hash_location_strategy.ts
@@ -20,7 +20,11 @@ export class HashLocationStrategy extends LocationStrategy {
20
21
getBaseHref(): string { return ''; }
22
23
- path(): string { return this._location.hash; }
+ path(): string {
24
+ // the hash value is always prefixed with a `#`
25
+ // and if it is empty then it will stay empty
26
+ return this._location.hash.substr(1);
27
+ }
28
29
pushState(state: any, title: string, url: string) {
30
this._history.pushState(state, title, '#' + url);
0 commit comments