Skip to content

Commit 9e0f064

Browse files
Merge pull request #34 from aitboudad/ng2-location-services
Ng2LocationServices take account of APP_BASE_HREF.
2 parents 3c043dd + b858bd6 commit 9e0f064

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/location/locationService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ export class Ng2LocationServices extends BaseLocationServices {
1111
}
1212

1313
_get() {
14-
return this._locationStrategy.path(true);
14+
return this._locationStrategy.path(true)
15+
.replace(this._locationStrategy.getBaseHref().replace(/\/$/, ''), '');
1516
}
1617

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

0 commit comments

Comments
 (0)