fix(location): improve the 'No base href set' error message

This commit is contained in:
Igor Minar 2015-10-06 20:58:38 -07:00
parent dea6a4593b
commit 15ab6f6ea8
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ export class Location {
if (isBlank(browserBaseHref)) {
throw new BaseException(
`No base href set. Either provide a binding to "appBaseHrefToken" or add a base element.`);
`No base href set. Either provide a binding for the APP_BASE_HREF token or add a base element to the document.`);
}
this._baseHref = stripTrailingSlash(stripIndexHtml(browserBaseHref));

View File

@ -81,7 +81,7 @@ export function main() {
locationStrategy.internalBaseHref = null;
expect(() => new Location(locationStrategy))
.toThrowError(
`No base href set. Either provide a binding to "appBaseHrefToken" or add a base element.`);
`No base href set. Either provide a binding for the APP_BASE_HREF token or add a base element to the document.`);
});
it('should revert to the previous path when a back() operation is executed', () => {