diff --git a/modules/angular1_router/test/ng_link_spec.js b/modules/angular1_router/test/ng_link_spec.js index 2346da812b..213db2f26b 100644 --- a/modules/angular1_router/test/ng_link_spec.js +++ b/modules/angular1_router/test/ng_link_spec.js @@ -38,9 +38,9 @@ describe('ngOutlet', function () { $router.config([ { path: '/a', component: OneController }, - { path: '/b', component: TwoController, as: 'two' } + { path: '/b', component: TwoController, as: 'Two' } ]); - compile('link | outer {
}'); + compile('link | outer {
}'); $router.navigateByUrl('/a'); $rootScope.$digest(); @@ -49,11 +49,11 @@ describe('ngOutlet', function () { }); it('should allow linking from the child and the parent', function () { - put('one', '
{{number}}
'); + put('one', '
{{number}}
'); $router.config([ { path: '/a', component: OneController }, - { path: '/b', component: TwoController, as: 'two' } + { path: '/b', component: TwoController, as: 'Two' } ]); compile('outer {
}'); @@ -66,11 +66,11 @@ describe('ngOutlet', function () { it('should allow params in routerLink directive', function () { put('router', '
outer {
}
'); - put('one', '
{{number}}
'); + put('one', '
{{number}}
'); $router.config([ { path: '/a', component: OneController }, - { path: '/b/:param', component: TwoController, as: 'two' } + { path: '/b/:param', component: TwoController, as: 'Two' } ]); compile('
'); @@ -83,11 +83,11 @@ describe('ngOutlet', function () { // TODO: test dynamic links it('should update the href of links with bound params', function () { put('router', '
outer {
}
'); - put('one', '
{{one.number}}
'); + put('one', '
{{one.number}}
'); $router.config([ { path: '/a', component: OneController }, - { path: '/b/:param', component: TwoController, as: 'two' } + { path: '/b/:param', component: TwoController, as: 'Two' } ]); compile('
'); diff --git a/modules/angular2/test/router/integration/router_link_spec.ts b/modules/angular2/test/router/integration/router_link_spec.ts index 9a9229bf82..aa3c268b10 100644 --- a/modules/angular2/test/router/integration/router_link_spec.ts +++ b/modules/angular2/test/router/integration/router_link_spec.ts @@ -72,9 +72,9 @@ export function main() { it('should generate absolute hrefs that include the base href', inject([AsyncTestCompleter], (async) => { location.setBaseHref('/my/base'); - compile('') + compile('') .then((_) => - router.config([new Route({path: '/user', component: UserCmp, as: 'user'})])) + router.config([new Route({path: '/user', component: UserCmp, as: 'User'})])) .then((_) => router.navigateByUrl('/a/b')) .then((_) => { rootTC.detectChanges(); @@ -85,9 +85,9 @@ export function main() { it('should generate link hrefs without params', inject([AsyncTestCompleter], (async) => { - compile('') + compile('') .then((_) => - router.config([new Route({path: '/user', component: UserCmp, as: 'user'})])) + router.config([new Route({path: '/user', component: UserCmp, as: 'User'})])) .then((_) => router.navigateByUrl('/a/b')) .then((_) => { rootTC.detectChanges(); @@ -98,9 +98,9 @@ export function main() { it('should generate link hrefs with params', inject([AsyncTestCompleter], (async) => { - compile('{{name}}') + compile('{{name}}') .then((_) => router.config( - [new Route({path: '/user/:name', component: UserCmp, as: 'user'})])) + [new Route({path: '/user/:name', component: UserCmp, as: 'User'})])) .then((_) => router.navigateByUrl('/a/b')) .then((_) => { rootTC.debugElement.componentInstance.name = 'brian'; @@ -117,7 +117,7 @@ export function main() { inject([AsyncTestCompleter], (async) => { compile() .then((_) => router.config( - [new Route({path: '/page/:number', component: SiblingPageCmp, as: 'page'})])) + [new Route({path: '/page/:number', component: SiblingPageCmp, as: 'Page'})])) .then((_) => router.navigateByUrl('/page/1')) .then((_) => { rootTC.detectChanges(); @@ -137,10 +137,10 @@ export function main() { new AsyncRoute({ path: '/child-with-grandchild/...', loader: parentCmpLoader, - as: 'child-with-grandchild' + as: 'ChildWithGrandchild' }) ])) - .then((_) => router.navigate(['/child-with-grandchild'])) + .then((_) => router.navigate(['/ChildWithGrandchild'])) .then((_) => { rootTC.detectChanges(); expect(DOM.getAttribute(rootTC.debugElement.componentViewChildren[1] @@ -156,7 +156,7 @@ export function main() { inject([AsyncTestCompleter], (async) => { compile() .then((_) => router.config( - [new Route({path: '/book/:title/...', component: BookCmp, as: 'book'})])) + [new Route({path: '/book/:title/...', component: BookCmp, as: 'Book'})])) .then((_) => router.navigateByUrl('/book/1984/page/1')) .then((_) => { rootTC.detectChanges(); @@ -180,11 +180,11 @@ export function main() { describe('router-link-active CSS class', () => { it('should be added to the associated element', inject([AsyncTestCompleter], (async) => { router.config([ - new Route({path: '/child', component: HelloCmp, as: 'child'}), - new Route({path: '/better-child', component: Hello2Cmp, as: 'better-child'}) + new Route({path: '/child', component: HelloCmp, as: 'Child'}), + new Route({path: '/better-child', component: Hello2Cmp, as: 'BetterChild'}) ]) - .then((_) => compile(`Child - Better Child + .then((_) => compile(`Child + Better Child `)) .then((_) => { var element = rootTC.debugElement.nativeElement; @@ -211,15 +211,15 @@ export function main() { it('should be added to links in child routes', inject([AsyncTestCompleter], (async) => { router.config([ - new Route({path: '/child', component: HelloCmp, as: 'child'}), + new Route({path: '/child', component: HelloCmp, as: 'Child'}), new Route({ path: '/child-with-grandchild/...', component: ParentCmp, - as: 'child-with-grandchild' + as: 'ChildWithGrandchild' }) ]) - .then((_) => compile(`Child - Better Child + .then((_) => compile(`Child + Better Child `)) .then((_) => { var element = rootTC.debugElement.nativeElement; @@ -261,9 +261,9 @@ export function main() { }; it('should navigate to link hrefs without params', inject([AsyncTestCompleter], (async) => { - compile('') + compile('') .then((_) => router.config( - [new Route({path: '/user', component: UserCmp, as: 'user'})])) + [new Route({path: '/user', component: UserCmp, as: 'User'})])) .then((_) => router.navigateByUrl('/a/b')) .then((_) => { rootTC.detectChanges(); @@ -282,9 +282,9 @@ export function main() { it('should navigate to link hrefs in presence of base href', inject([AsyncTestCompleter], (async) => { location.setBaseHref('/base'); - compile('') + compile('') .then((_) => router.config( - [new Route({path: '/user', component: UserCmp, as: 'user'})])) + [new Route({path: '/user', component: UserCmp, as: 'User'})])) .then((_) => router.navigateByUrl('/a/b')) .then((_) => { rootTC.detectChanges(); @@ -322,7 +322,7 @@ class UserCmp { @Component({selector: 'page-cmp'}) @View({ template: - `page #{{pageNumber}} | next`, + `page #{{pageNumber}} | next`, directives: [RouterLink] }) class SiblingPageCmp { @@ -350,14 +350,14 @@ function parentCmpLoader() { @Component({selector: 'parent-cmp'}) @View({ - template: `{ Grandchild - Better Grandchild + template: `{ Grandchild + Better Grandchild }`, directives: ROUTER_DIRECTIVES }) @RouteConfig([ - new Route({path: '/grandchild', component: HelloCmp, as: 'grandchild'}), - new Route({path: '/better-grandchild', component: Hello2Cmp, as: 'better-grandchild'}) + new Route({path: '/grandchild', component: HelloCmp, as: 'Grandchild'}), + new Route({path: '/better-grandchild', component: Hello2Cmp, as: 'BetterGrandchild'}) ]) class ParentCmp { constructor(public router: Router) {} @@ -365,11 +365,11 @@ class ParentCmp { @Component({selector: 'book-cmp'}) @View({ - template: `{{title}} | + template: `{{title}} | `, directives: ROUTER_DIRECTIVES }) -@RouteConfig([new Route({path: '/page/:number', component: SiblingPageCmp, as: 'page'})]) +@RouteConfig([new Route({path: '/page/:number', component: SiblingPageCmp, as: 'Page'})]) class BookCmp { title: string; constructor(params: RouteParams) { this.title = params.get('title'); } diff --git a/modules/angular2/test/router/route_recognizer_spec.ts b/modules/angular2/test/router/route_recognizer_spec.ts index df4bf15b6e..fff6eb63e9 100644 --- a/modules/angular2/test/router/route_recognizer_spec.ts +++ b/modules/angular2/test/router/route_recognizer_spec.ts @@ -108,28 +108,28 @@ export function main() { it('should generate URLs with params', () => { - recognizer.config(new Route({path: '/app/user/:name', component: DummyCmpA, as: 'user'})); - var instruction = recognizer.generate('user', {'name': 'misko'}); + recognizer.config(new Route({path: '/app/user/:name', component: DummyCmpA, as: 'User'})); + var instruction = recognizer.generate('User', {'name': 'misko'}); expect(instruction.urlPath).toEqual('app/user/misko'); }); it('should generate URLs with numeric params', () => { - recognizer.config(new Route({path: '/app/page/:number', component: DummyCmpA, as: 'page'})); - expect(recognizer.generate('page', {'number': 42}).urlPath).toEqual('app/page/42'); + recognizer.config(new Route({path: '/app/page/:number', component: DummyCmpA, as: 'Page'})); + expect(recognizer.generate('Page', {'number': 42}).urlPath).toEqual('app/page/42'); }); it('should throw in the absence of required params URLs', () => { - recognizer.config(new Route({path: 'app/user/:name', component: DummyCmpA, as: 'user'})); - expect(() => recognizer.generate('user', {})) + recognizer.config(new Route({path: 'app/user/:name', component: DummyCmpA, as: 'User'})); + expect(() => recognizer.generate('User', {})) .toThrowError('Route generator for \'name\' was not included in parameters passed.'); }); describe('params', () => { it('should recognize parameters within the URL path', () => { - recognizer.config(new Route({path: 'profile/:name', component: DummyCmpA, as: 'user'})); + recognizer.config(new Route({path: 'profile/:name', component: DummyCmpA, as: 'User'})); var solution = recognize(recognizer, '/profile/matsko?comments=all'); expect(solution.params).toEqual({'name': 'matsko', 'comments': 'all'}); }); @@ -138,18 +138,18 @@ export function main() { it('should generate and populate the given static-based route with querystring params', () => { recognizer.config( - new Route({path: 'forum/featured', component: DummyCmpA, as: 'forum-page'})); + new Route({path: 'forum/featured', component: DummyCmpA, as: 'ForumPage'})); var params = {'start': 10, 'end': 100}; - var result = recognizer.generate('forum-page', params); + var result = recognizer.generate('ForumPage', params); expect(result.urlPath).toEqual('forum/featured'); expect(result.urlParams).toEqual(['start=10', 'end=100']); }); it('should prefer positional params over query params', () => { - recognizer.config(new Route({path: 'profile/:name', component: DummyCmpA, as: 'user'})); + recognizer.config(new Route({path: 'profile/:name', component: DummyCmpA, as: 'User'})); var solution = recognize(recognizer, '/profile/yegor?name=igor'); expect(solution.params).toEqual({'name': 'yegor'}); @@ -157,7 +157,7 @@ export function main() { it('should ignore matrix params for the top-level component', () => { - recognizer.config(new Route({path: '/home/:subject', component: DummyCmpA, as: 'user'})); + recognizer.config(new Route({path: '/home/:subject', component: DummyCmpA, as: 'User'})); var solution = recognize(recognizer, '/home;sort=asc/zero;one=1?two=2'); expect(solution.params).toEqual({'subject': 'zero', 'two': '2'}); }); diff --git a/modules/angular2/test/router/route_registry_spec.ts b/modules/angular2/test/router/route_registry_spec.ts index 0d20d75c59..acdac61dea 100644 --- a/modules/angular2/test/router/route_registry_spec.ts +++ b/modules/angular2/test/router/route_registry_spec.ts @@ -43,45 +43,45 @@ export function main() { it('should generate URLs starting at the given component', () => { registry.config(RootHostCmp, - new Route({path: '/first/...', component: DummyParentCmp, as: 'firstCmp'})); + new Route({path: '/first/...', component: DummyParentCmp, as: 'FirstCmp'})); - expect(stringifyInstruction(registry.generate(['firstCmp', 'secondCmp'], RootHostCmp))) + expect(stringifyInstruction(registry.generate(['FirstCmp', 'SecondCmp'], RootHostCmp))) .toEqual('first/second'); - expect(stringifyInstruction(registry.generate(['secondCmp'], DummyParentCmp))) + expect(stringifyInstruction(registry.generate(['SecondCmp'], DummyParentCmp))) .toEqual('second'); }); it('should generate URLs that account for redirects', () => { registry.config( RootHostCmp, - new Route({path: '/first/...', component: DummyParentRedirectCmp, as: 'firstCmp'})); + new Route({path: '/first/...', component: DummyParentRedirectCmp, as: 'FirstCmp'})); - expect(stringifyInstruction(registry.generate(['firstCmp'], RootHostCmp))) + expect(stringifyInstruction(registry.generate(['FirstCmp'], RootHostCmp))) .toEqual('first/second'); }); it('should generate URLs in a hierarchy of redirects', () => { registry.config( RootHostCmp, - new Route({path: '/first/...', component: DummyMultipleRedirectCmp, as: 'firstCmp'})); + new Route({path: '/first/...', component: DummyMultipleRedirectCmp, as: 'FirstCmp'})); - expect(stringifyInstruction(registry.generate(['firstCmp'], RootHostCmp))) + expect(stringifyInstruction(registry.generate(['FirstCmp'], RootHostCmp))) .toEqual('first/second/third'); }); it('should generate URLs with params', () => { registry.config( RootHostCmp, - new Route({path: '/first/:param/...', component: DummyParentParamCmp, as: 'firstCmp'})); + new Route({path: '/first/:param/...', component: DummyParentParamCmp, as: 'FirstCmp'})); var url = stringifyInstruction(registry.generate( - ['firstCmp', {param: 'one'}, 'secondCmp', {param: 'two'}], RootHostCmp)); + ['FirstCmp', {param: 'one'}, 'SecondCmp', {param: 'two'}], RootHostCmp)); expect(url).toEqual('first/one/second/two'); }); it('should generate params as an empty StringMap when no params are given', () => { - registry.config(RootHostCmp, new Route({path: '/test', component: DummyCmpA, as: 'test'})); - var instruction = registry.generate(['test'], RootHostCmp); + registry.config(RootHostCmp, new Route({path: '/test', component: DummyCmpA, as: 'Test'})); + var instruction = registry.generate(['Test'], RootHostCmp); expect(instruction.component.params).toEqual({}); }); @@ -89,15 +89,15 @@ export function main() { inject([AsyncTestCompleter], (async) => { registry.config( RootHostCmp, - new AsyncRoute({path: '/first/...', loader: AsyncParentLoader, as: 'firstCmp'})); + new AsyncRoute({path: '/first/...', loader: AsyncParentLoader, as: 'FirstCmp'})); - expect(() => registry.generate(['firstCmp', 'secondCmp'], RootHostCmp)) - .toThrowError('Could not find route named "secondCmp".'); + expect(() => registry.generate(['FirstCmp', 'SecondCmp'], RootHostCmp)) + .toThrowError('Could not find route named "SecondCmp".'); registry.recognize('/first/second', RootHostCmp) .then((_) => { expect( - stringifyInstruction(registry.generate(['firstCmp', 'secondCmp'], RootHostCmp))) + stringifyInstruction(registry.generate(['FirstCmp', 'SecondCmp'], RootHostCmp))) .toEqual('first/second'); async.done(); }); @@ -105,7 +105,7 @@ export function main() { it('should throw when generating a url and a parent has no config', () => { - expect(() => registry.generate(['firstCmp', 'secondCmp'], RootHostCmp)) + expect(() => registry.generate(['FirstCmp', 'SecondCmp'], RootHostCmp)) .toThrowError('Component "RootHostCmp" has no route config.'); }); @@ -233,9 +233,9 @@ export function main() { it('should throw when linkParams are not terminal', () => { registry.config(RootHostCmp, - new Route({path: '/first/...', component: DummyParentCmp, as: 'first'})); - expect(() => { registry.generate(['first'], RootHostCmp); }) - .toThrowError('Link "["first"]" does not resolve to a terminal or async instruction.'); + new Route({path: '/first/...', component: DummyParentCmp, as: 'First'})); + expect(() => { registry.generate(['First'], RootHostCmp); }) + .toThrowError('Link "["First"]" does not resolve to a terminal or async instruction.'); }); it('should match matrix params on child components and query params on the root component', @@ -256,13 +256,13 @@ export function main() { it('should generate URLs with matrix and query params', () => { registry.config( RootHostCmp, - new Route({path: '/first/:param/...', component: DummyParentParamCmp, as: 'firstCmp'})); + new Route({path: '/first/:param/...', component: DummyParentParamCmp, as: 'FirstCmp'})); var url = stringifyInstruction(registry.generate( [ - 'firstCmp', + 'FirstCmp', {param: 'one', query: 'cats'}, - 'secondCmp', + 'SecondCmp', { param: 'two', sort: 'asc', @@ -294,7 +294,7 @@ class DummyCmpB {} @RouteConfig([ new Redirect({path: '/', redirectTo: '/third'}), - new Route({path: '/third', component: DummyCmpB, as: 'thirdCmp'}) + new Route({path: '/third', component: DummyCmpB, as: 'ThirdCmp'}) ]) class DummyRedirectCmp { } @@ -302,23 +302,23 @@ class DummyRedirectCmp { @RouteConfig([ new Redirect({path: '/', redirectTo: '/second'}), - new Route({path: '/second/...', component: DummyRedirectCmp, as: 'secondCmp'}) + new Route({path: '/second/...', component: DummyRedirectCmp, as: 'SecondCmp'}) ]) class DummyMultipleRedirectCmp { } @RouteConfig([ new Redirect({path: '/', redirectTo: '/second'}), - new Route({path: '/second', component: DummyCmpB, as: 'secondCmp'}) + new Route({path: '/second', component: DummyCmpB, as: 'SecondCmp'}) ]) class DummyParentRedirectCmp { } -@RouteConfig([new Route({path: '/second', component: DummyCmpB, as: 'secondCmp'})]) +@RouteConfig([new Route({path: '/second', component: DummyCmpB, as: 'SecondCmp'})]) class DummyParentCmp { } -@RouteConfig([new Route({path: '/second/:param', component: DummyCmpB, as: 'secondCmp'})]) +@RouteConfig([new Route({path: '/second/:param', component: DummyCmpB, as: 'SecondCmp'})]) class DummyParentParamCmp { } diff --git a/modules/angular2/test/router/router_link_spec.ts b/modules/angular2/test/router/router_link_spec.ts index 7df2ff5b71..24d3f00421 100644 --- a/modules/angular2/test/router/router_link_spec.ts +++ b/modules/angular2/test/router/router_link_spec.ts @@ -88,7 +88,7 @@ class UserCmp { @View({ template: `
- detail view + detail view
`, directives: [RouterLink] }) diff --git a/modules/angular2/test/router/router_spec.ts b/modules/angular2/test/router/router_spec.ts index ee7e79d30e..9351b91e62 100644 --- a/modules/angular2/test/router/router_spec.ts +++ b/modules/angular2/test/router/router_spec.ts @@ -120,9 +120,9 @@ export function main() { it('should throw when linkParams does not start with a "/" or "./"', () => { - expect(() => router.generate(['firstCmp', 'secondCmp'])) + expect(() => router.generate(['FirstCmp', 'SecondCmp'])) .toThrowError( - `Link "${ListWrapper.toJSON(['firstCmp', 'secondCmp'])}" must start with "/", "./", or "../"`); + `Link "${ListWrapper.toJSON(['FirstCmp', 'SecondCmp'])}" must start with "/", "./", or "../"`); }); @@ -141,12 +141,12 @@ export function main() { }); it('should generate URLs from the root component when the path starts with /', () => { - router.config([new Route({path: '/first/...', component: DummyParentComp, as: 'firstCmp'})]); + router.config([new Route({path: '/first/...', component: DummyParentComp, as: 'FirstCmp'})]); - var instruction = router.generate(['/firstCmp', 'secondCmp']); + var instruction = router.generate(['/FirstCmp', 'SecondCmp']); expect(stringifyInstruction(instruction)).toEqual('first/second'); - instruction = router.generate(['/firstCmp/secondCmp']); + instruction = router.generate(['/FirstCmp/SecondCmp']); expect(stringifyInstruction(instruction)).toEqual('first/second'); }); @@ -188,9 +188,9 @@ export function main() { describe('query string params', () => { it('should use query string params for the root route', () => { router.config( - [new Route({path: '/hi/how/are/you', component: DummyComponent, as: 'greeting-url'})]); + [new Route({path: '/hi/how/are/you', component: DummyComponent, as: 'GreetingUrl'})]); - var instruction = router.generate(['/greeting-url', {'name': 'brad'}]); + var instruction = router.generate(['/GreetingUrl', {'name': 'brad'}]); var path = stringifyInstruction(instruction); expect(path).toEqual('hi/how/are/you?name=brad'); }); @@ -198,9 +198,9 @@ export function main() { it('should serialize parameters that are not part of the route definition as query string params', () => { router.config( - [new Route({path: '/one/two/:three', component: DummyComponent, as: 'number-url'})]); + [new Route({path: '/one/two/:three', component: DummyComponent, as: 'NumberUrl'})]); - var instruction = router.generate(['/number-url', {'three': 'three', 'four': 'four'}]); + var instruction = router.generate(['/NumberUrl', {'three': 'three', 'four': 'four'}]); var path = stringifyInstruction(instruction); expect(path).toEqual('one/two/three?four=four'); }); @@ -209,20 +209,20 @@ export function main() { describe('matrix params', () => { it('should generate matrix params for each non-root component', () => { router.config( - [new Route({path: '/first/...', component: DummyParentComp, as: 'firstCmp'})]); + [new Route({path: '/first/...', component: DummyParentComp, as: 'FirstCmp'})]); var instruction = - router.generate(['/firstCmp', {'key': 'value'}, 'secondCmp', {'project': 'angular'}]); + router.generate(['/FirstCmp', {'key': 'value'}, 'SecondCmp', {'project': 'angular'}]); var path = stringifyInstruction(instruction); expect(path).toEqual('first/second;project=angular?key=value'); }); it('should work with named params', () => { router.config( - [new Route({path: '/first/:token/...', component: DummyParentComp, as: 'firstCmp'})]); + [new Route({path: '/first/:token/...', component: DummyParentComp, as: 'FirstCmp'})]); var instruction = - router.generate(['/firstCmp', {'token': 'min'}, 'secondCmp', {'author': 'max'}]); + router.generate(['/FirstCmp', {'token': 'min'}, 'SecondCmp', {'author': 'max'}]); var path = stringifyInstruction(instruction); expect(path).toEqual('first/min/second;author=max'); }); @@ -236,7 +236,7 @@ function loader(): Promise { class DummyComponent {} -@RouteConfig([new Route({path: '/second', component: DummyComponent, as: 'secondCmp'})]) +@RouteConfig([new Route({path: '/second', component: DummyComponent, as: 'SecondCmp'})]) class DummyParentComp { } diff --git a/modules/examples/src/routing/drafts.html b/modules/examples/src/routing/drafts.html index b3ed617a62..c40ea050f7 100644 --- a/modules/examples/src/routing/drafts.html +++ b/modules/examples/src/routing/drafts.html @@ -4,7 +4,7 @@
  1. + [router-link]="['/DetailPage', {'id':item.id}]"> {{ item.subject }}
diff --git a/modules/examples/src/routing/inbox-app.html b/modules/examples/src/routing/inbox-app.html index 9a37dc4938..0e51dd6968 100644 --- a/modules/examples/src/routing/inbox-app.html +++ b/modules/examples/src/routing/inbox-app.html @@ -1,5 +1,5 @@ - Inbox - Drafts + Inbox + Drafts diff --git a/modules/examples/src/routing/inbox-app.ts b/modules/examples/src/routing/inbox-app.ts index f97520c0fe..fb58270caf 100644 --- a/modules/examples/src/routing/inbox-app.ts +++ b/modules/examples/src/routing/inbox-app.ts @@ -134,9 +134,9 @@ class DraftsCmp { @Component({selector: 'inbox-app', viewBindings: [DbService]}) @View({templateUrl: "inbox-app.html", directives: [RouterOutlet, RouterLink]}) @RouteConfig([ - new Route({path: '/', component: InboxCmp, as: 'inbox'}), - new Route({path: '/drafts', component: DraftsCmp, as: 'drafts'}), - new Route({path: '/detail/:id', component: InboxDetailCmp, as: 'detailPage'}) + new Route({path: '/', component: InboxCmp, as: 'Inbox'}), + new Route({path: '/drafts', component: DraftsCmp, as: 'Drafts'}), + new Route({path: '/detail/:id', component: InboxDetailCmp, as: 'DetailPage'}) ]) export class InboxApp { router: Router; diff --git a/modules/examples/src/routing/inbox-detail.html b/modules/examples/src/routing/inbox-detail.html index 8e11ccae51..c99aa96ffd 100644 --- a/modules/examples/src/routing/inbox-detail.html +++ b/modules/examples/src/routing/inbox-detail.html @@ -13,6 +13,6 @@

- Back + Back diff --git a/modules/examples/src/routing/inbox.html b/modules/examples/src/routing/inbox.html index 1c01863eb8..e99b3952fc 100644 --- a/modules/examples/src/routing/inbox.html +++ b/modules/examples/src/routing/inbox.html @@ -4,7 +4,7 @@
  1. {{ item.subject }} + [router-link]="['/DetailPage', {'id':item.id}]">{{ item.subject }}