fix(router): add baseUrl to relative paths, but not absolute.

Closes #1783
This commit is contained in:
Rado Kirov
2015-05-11 14:49:55 -07:00
parent 7f976381d5
commit a574154108
2 changed files with 11 additions and 6 deletions

View File

@ -35,8 +35,8 @@ export class Location {
}
go(url:string) {
url = this._stripBaseHref(url);
this._browserLocation.pushState(null, '', url);
var finalUrl = url[0] == '/' ? url : this._baseHref + '/' + url;
this._browserLocation.pushState(null, '', finalUrl);
}
forward() {