diff --git a/modules/@angular/router/src/apply_redirects.ts b/modules/@angular/router/src/apply_redirects.ts index 3b3257b995..0c95d2cc88 100644 --- a/modules/@angular/router/src/apply_redirects.ts +++ b/modules/@angular/router/src/apply_redirects.ts @@ -98,7 +98,7 @@ class ApplyRedirects { } private noMatchError(e: NoMatch): any { - return new Error(`Cannot match any routes: '${e.segmentGroup}'`); + return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`); } private createUrlTree(rootCandidate: UrlSegmentGroup): UrlTree { diff --git a/modules/@angular/router/test/apply_redirects.spec.ts b/modules/@angular/router/test/apply_redirects.spec.ts index a6ab23c4a4..814e87cd90 100644 --- a/modules/@angular/router/test/apply_redirects.spec.ts +++ b/modules/@angular/router/test/apply_redirects.spec.ts @@ -293,7 +293,7 @@ describe('applyRedirects', () => { (e) => { throw 'Should not reach'; }); }); - it('should load the configuration of a whilecard route', () => { + it('should load the configuration of a wildcard route', () => { const loadedConfig = new LoadedRouterConfig( [{path: '', component: ComponentB}], 'stubInjector', 'stubFactoryResolver'); @@ -353,7 +353,7 @@ describe('applyRedirects', () => { applyRedirects(null, null, tree('b'), config) .subscribe( (_) => { throw 'Should not be reached'; }, - e => { expect(e.message).toEqual('Cannot match any routes: \'b\''); }); + e => { expect(e.message).toEqual('Cannot match any routes. URL Segment: \'b\''); }); }); it('redirect from an empty path should work (nested case)', () => { @@ -483,7 +483,7 @@ describe('applyRedirects', () => { applyRedirects(null, null, tree('a/(d//aux:e)'), config) .subscribe( (_) => { throw 'Should not be reached'; }, - e => { expect(e.message).toEqual('Cannot match any routes: \'a\''); }); + e => { expect(e.message).toEqual('Cannot match any routes. URL Segment: \'a\''); }); }); }); });