From b858bd6f9d855a842f6f29d4bad056430b74f5ba Mon Sep 17 00:00:00 2001 From: Abdellatif Ait boudad Date: Mon, 23 Jan 2017 12:56:38 +0000 Subject: [PATCH] [fixed #32] Ng2LocationServices take account of APP_BASE_HREF. --- src/location/locationService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/location/locationService.ts b/src/location/locationService.ts index 915c0a72b..f587dc374 100644 --- a/src/location/locationService.ts +++ b/src/location/locationService.ts @@ -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 {