Skip to content

Commit 15ab6f6

Browse files
committed
fix(location): improve the 'No base href set' error message
1 parent dea6a45 commit 15ab6f6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

modules/angular2/src/router/location.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class Location {
8989

9090
if (isBlank(browserBaseHref)) {
9191
throw new BaseException(
92-
`No base href set. Either provide a binding to "appBaseHrefToken" or add a base element.`);
92+
`No base href set. Either provide a binding for the APP_BASE_HREF token or add a base element to the document.`);
9393
}
9494

9595
this._baseHref = stripTrailingSlash(stripIndexHtml(browserBaseHref));

modules/angular2/test/router/location_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function main() {
8181
locationStrategy.internalBaseHref = null;
8282
expect(() => new Location(locationStrategy))
8383
.toThrowError(
84-
`No base href set. Either provide a binding to "appBaseHrefToken" or add a base element.`);
84+
`No base href set. Either provide a binding for the APP_BASE_HREF token or add a base element to the document.`);
8585
});
8686

8787
it('should revert to the previous path when a back() operation is executed', () => {

0 commit comments

Comments
 (0)