Skip to content

Commit

Permalink
Merge pull request #34 from aitboudad/ng2-location-services
Browse files Browse the repository at this point in the history
Ng2LocationServices take account of APP_BASE_HREF.
  • Loading branch information
christopherthielen authored Feb 11, 2017
2 parents 3c043dd + b858bd6 commit 9e0f064
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/location/locationService.ts
Original file line number Diff line number Diff line change
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 9e0f064

Please sign in to comment.