Skip to content

Commit

Permalink
[fixed ui-router#32] Ng2LocationServices take account of APP_BASE_HREF.
Browse files Browse the repository at this point in the history
  • Loading branch information
aitboudad committed Jan 23, 2017
1 parent fcf7ee3 commit b858bd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/location/locationService.ts
Expand Up @@ -11,7 +11,8 @@ export class Ng2LocationServices extends BaseLocationServices {
}

_get() {
return this._locationStrategy.path(true);
return this._locationStrategy.path(true)
.replace(this._locationStrategy.getBaseHref().replace(/\/$/, ''), '');
}

_set(state: any, title: string, url: string, replace: boolean): any {
Expand Down

0 comments on commit b858bd6

Please sign in to comment.