@@ -72,9 +72,9 @@ export function main() {
7272 it ( 'should generate absolute hrefs that include the base href' ,
7373 inject ( [ AsyncTestCompleter ] , ( async ) => {
7474 location . setBaseHref ( '/my/base' ) ;
75- compile ( '<a href="hello" [router-link]="[\'./user \']"></a>' )
75+ compile ( '<a href="hello" [router-link]="[\'./User \']"></a>' )
7676 . then ( ( _ ) =>
77- router . config ( [ new Route ( { path : '/user' , component : UserCmp , as : 'user ' } ) ] ) )
77+ router . config ( [ new Route ( { path : '/user' , component : UserCmp , as : 'User ' } ) ] ) )
7878 . then ( ( _ ) => router . navigateByUrl ( '/a/b' ) )
7979 . then ( ( _ ) => {
8080 rootTC . detectChanges ( ) ;
@@ -85,9 +85,9 @@ export function main() {
8585
8686
8787 it ( 'should generate link hrefs without params' , inject ( [ AsyncTestCompleter ] , ( async ) => {
88- compile ( '<a href="hello" [router-link]="[\'./user \']"></a>' )
88+ compile ( '<a href="hello" [router-link]="[\'./User \']"></a>' )
8989 . then ( ( _ ) =>
90- router . config ( [ new Route ( { path : '/user' , component : UserCmp , as : 'user ' } ) ] ) )
90+ router . config ( [ new Route ( { path : '/user' , component : UserCmp , as : 'User ' } ) ] ) )
9191 . then ( ( _ ) => router . navigateByUrl ( '/a/b' ) )
9292 . then ( ( _ ) => {
9393 rootTC . detectChanges ( ) ;
@@ -98,9 +98,9 @@ export function main() {
9898
9999
100100 it ( 'should generate link hrefs with params' , inject ( [ AsyncTestCompleter ] , ( async ) => {
101- compile ( '<a href="hello" [router-link]="[\'./user \', {name: name}]">{{name}}</a>' )
101+ compile ( '<a href="hello" [router-link]="[\'./User \', {name: name}]">{{name}}</a>' )
102102 . then ( ( _ ) => router . config (
103- [ new Route ( { path : '/user/:name' , component : UserCmp , as : 'user ' } ) ] ) )
103+ [ new Route ( { path : '/user/:name' , component : UserCmp , as : 'User ' } ) ] ) )
104104 . then ( ( _ ) => router . navigateByUrl ( '/a/b' ) )
105105 . then ( ( _ ) => {
106106 rootTC . debugElement . componentInstance . name = 'brian' ;
@@ -117,7 +117,7 @@ export function main() {
117117 inject ( [ AsyncTestCompleter ] , ( async ) => {
118118 compile ( )
119119 . then ( ( _ ) => router . config (
120- [ new Route ( { path : '/page/:number' , component : SiblingPageCmp , as : 'page ' } ) ] ) )
120+ [ new Route ( { path : '/page/:number' , component : SiblingPageCmp , as : 'Page ' } ) ] ) )
121121 . then ( ( _ ) => router . navigateByUrl ( '/page/1' ) )
122122 . then ( ( _ ) => {
123123 rootTC . detectChanges ( ) ;
@@ -137,10 +137,10 @@ export function main() {
137137 new AsyncRoute ( {
138138 path : '/child-with-grandchild/...' ,
139139 loader : parentCmpLoader ,
140- as : 'child-with-grandchild '
140+ as : 'ChildWithGrandchild '
141141 } )
142142 ] ) )
143- . then ( ( _ ) => router . navigate ( [ '/child-with-grandchild ' ] ) )
143+ . then ( ( _ ) => router . navigate ( [ '/ChildWithGrandchild ' ] ) )
144144 . then ( ( _ ) => {
145145 rootTC . detectChanges ( ) ;
146146 expect ( DOM . getAttribute ( rootTC . debugElement . componentViewChildren [ 1 ]
@@ -156,7 +156,7 @@ export function main() {
156156 inject ( [ AsyncTestCompleter ] , ( async ) => {
157157 compile ( )
158158 . then ( ( _ ) => router . config (
159- [ new Route ( { path : '/book/:title/...' , component : BookCmp , as : 'book ' } ) ] ) )
159+ [ new Route ( { path : '/book/:title/...' , component : BookCmp , as : 'Book ' } ) ] ) )
160160 . then ( ( _ ) => router . navigateByUrl ( '/book/1984/page/1' ) )
161161 . then ( ( _ ) => {
162162 rootTC . detectChanges ( ) ;
@@ -180,11 +180,11 @@ export function main() {
180180 describe ( 'router-link-active CSS class' , ( ) => {
181181 it ( 'should be added to the associated element' , inject ( [ AsyncTestCompleter ] , ( async ) => {
182182 router . config ( [
183- new Route ( { path : '/child' , component : HelloCmp , as : 'child ' } ) ,
184- new Route ( { path : '/better-child' , component : Hello2Cmp , as : 'better-child ' } )
183+ new Route ( { path : '/child' , component : HelloCmp , as : 'Child ' } ) ,
184+ new Route ( { path : '/better-child' , component : Hello2Cmp , as : 'BetterChild ' } )
185185 ] )
186- . then ( ( _ ) => compile ( `<a [router-link]="['./child ']" class="child-link">Child</a>
187- <a [router-link]="['./better-child ']" class="better-child-link">Better Child</a>
186+ . then ( ( _ ) => compile ( `<a [router-link]="['./Child ']" class="child-link">Child</a>
187+ <a [router-link]="['./BetterChild ']" class="better-child-link">Better Child</a>
188188 <router-outlet></router-outlet>` ) )
189189 . then ( ( _ ) => {
190190 var element = rootTC . debugElement . nativeElement ;
@@ -211,15 +211,15 @@ export function main() {
211211
212212 it ( 'should be added to links in child routes' , inject ( [ AsyncTestCompleter ] , ( async ) => {
213213 router . config ( [
214- new Route ( { path : '/child' , component : HelloCmp , as : 'child ' } ) ,
214+ new Route ( { path : '/child' , component : HelloCmp , as : 'Child ' } ) ,
215215 new Route ( {
216216 path : '/child-with-grandchild/...' ,
217217 component : ParentCmp ,
218- as : 'child-with-grandchild '
218+ as : 'ChildWithGrandchild '
219219 } )
220220 ] )
221- . then ( ( _ ) => compile ( `<a [router-link]="['./child ']" class="child-link">Child</a>
222- <a [router-link]="['./child-with-grandchild/grandchild ']" class="child-with-grandchild-link">Better Child</a>
221+ . then ( ( _ ) => compile ( `<a [router-link]="['./Child ']" class="child-link">Child</a>
222+ <a [router-link]="['./ChildWithGrandchild/Grandchild ']" class="child-with-grandchild-link">Better Child</a>
223223 <router-outlet></router-outlet>` ) )
224224 . then ( ( _ ) => {
225225 var element = rootTC . debugElement . nativeElement ;
@@ -261,9 +261,9 @@ export function main() {
261261 } ;
262262
263263 it ( 'should navigate to link hrefs without params' , inject ( [ AsyncTestCompleter ] , ( async ) => {
264- compile ( '<a href="hello" [router-link]="[\'./user \']"></a>' )
264+ compile ( '<a href="hello" [router-link]="[\'./User \']"></a>' )
265265 . then ( ( _ ) => router . config (
266- [ new Route ( { path : '/user' , component : UserCmp , as : 'user ' } ) ] ) )
266+ [ new Route ( { path : '/user' , component : UserCmp , as : 'User ' } ) ] ) )
267267 . then ( ( _ ) => router . navigateByUrl ( '/a/b' ) )
268268 . then ( ( _ ) => {
269269 rootTC . detectChanges ( ) ;
@@ -282,9 +282,9 @@ export function main() {
282282 it ( 'should navigate to link hrefs in presence of base href' ,
283283 inject ( [ AsyncTestCompleter ] , ( async ) => {
284284 location . setBaseHref ( '/base' ) ;
285- compile ( '<a href="hello" [router-link]="[\'./user \']"></a>' )
285+ compile ( '<a href="hello" [router-link]="[\'./User \']"></a>' )
286286 . then ( ( _ ) => router . config (
287- [ new Route ( { path : '/user' , component : UserCmp , as : 'user ' } ) ] ) )
287+ [ new Route ( { path : '/user' , component : UserCmp , as : 'User ' } ) ] ) )
288288 . then ( ( _ ) => router . navigateByUrl ( '/a/b' ) )
289289 . then ( ( _ ) => {
290290 rootTC . detectChanges ( ) ;
@@ -322,7 +322,7 @@ class UserCmp {
322322@Component ( { selector : 'page-cmp' } )
323323@View ( {
324324 template :
325- `page #{{pageNumber}} | <a href="hello" [router-link]="[\'../page \', {number: nextPage}]">next</a>` ,
325+ `page #{{pageNumber}} | <a href="hello" [router-link]="[\'../Page \', {number: nextPage}]">next</a>` ,
326326 directives : [ RouterLink ]
327327} )
328328class SiblingPageCmp {
@@ -350,26 +350,26 @@ function parentCmpLoader() {
350350
351351@Component ( { selector : 'parent-cmp' } )
352352@View ( {
353- template : `{ <a [router-link]="['./grandchild ']" class="grandchild-link">Grandchild</a>
354- <a [router-link]="['./better-grandchild ']" class="better-grandchild-link">Better Grandchild</a>
353+ template : `{ <a [router-link]="['./Grandchild ']" class="grandchild-link">Grandchild</a>
354+ <a [router-link]="['./BetterGrandchild ']" class="better-grandchild-link">Better Grandchild</a>
355355 <router-outlet></router-outlet> }` ,
356356 directives : ROUTER_DIRECTIVES
357357} )
358358@RouteConfig ( [
359- new Route ( { path : '/grandchild' , component : HelloCmp , as : 'grandchild ' } ) ,
360- new Route ( { path : '/better-grandchild' , component : Hello2Cmp , as : 'better-grandchild ' } )
359+ new Route ( { path : '/grandchild' , component : HelloCmp , as : 'Grandchild ' } ) ,
360+ new Route ( { path : '/better-grandchild' , component : Hello2Cmp , as : 'BetterGrandchild ' } )
361361] )
362362class ParentCmp {
363363 constructor ( public router : Router ) { }
364364}
365365
366366@Component ( { selector : 'book-cmp' } )
367367@View ( {
368- template : `<a href="hello" [router-link]="[\'./page \', {number: 100}]">{{title}}</a> |
368+ template : `<a href="hello" [router-link]="[\'./Page \', {number: 100}]">{{title}}</a> |
369369 <router-outlet></router-outlet>` ,
370370 directives : ROUTER_DIRECTIVES
371371} )
372- @RouteConfig ( [ new Route ( { path : '/page/:number' , component : SiblingPageCmp , as : 'page ' } ) ] )
372+ @RouteConfig ( [ new Route ( { path : '/page/:number' , component : SiblingPageCmp , as : 'Page ' } ) ] )
373373class BookCmp {
374374 title : string ;
375375 constructor ( params : RouteParams ) { this . title = params . get ( 'title' ) ; }
0 commit comments