From 422a7b18f60511637bae9fab3e022c0462b24074 Mon Sep 17 00:00:00 2001 From: Brian Ford Date: Mon, 2 Nov 2015 16:15:05 -0800 Subject: [PATCH] test(router): remove View decorator in router link fixtures --- .../router/integration/router_link_spec.ts | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/modules/angular2/test/router/integration/router_link_spec.ts b/modules/angular2/test/router/integration/router_link_spec.ts index 1d67ab694e..5b76fd538b 100644 --- a/modules/angular2/test/router/integration/router_link_spec.ts +++ b/modules/angular2/test/router/integration/router_link_spec.ts @@ -21,7 +21,7 @@ import {NumberWrapper} from 'angular2/src/facade/lang'; import {PromiseWrapper} from 'angular2/src/facade/async'; import {ListWrapper} from 'angular2/src/facade/collection'; -import {provide, Component, DirectiveResolver, View} from 'angular2/core'; +import {provide, Component, DirectiveResolver} from 'angular2/core'; import {SpyLocation} from 'angular2/src/mock/location_mock'; import { @@ -386,15 +386,17 @@ class MyComp { name; } -@Component({selector: 'user-cmp'}) -@View({template: "hello {{user}}"}) +@Component({ + selector: 'user-cmp', + template: "hello {{user}}" +}) class UserCmp { user: string; constructor(params: RouteParams) { this.user = params.get('name'); } } -@Component({selector: 'page-cmp'}) -@View({ +@Component({ + selector: 'page-cmp', template: `page #{{pageNumber}} | next`, directives: [RouterLink] @@ -408,8 +410,8 @@ class SiblingPageCmp { } } -@Component({selector: 'page-cmp'}) -@View({ +@Component({ + selector: 'page-cmp', template: `page #{{pageNumber}} | next`, directives: [RouterLink] @@ -423,13 +425,17 @@ class NoPrefixSiblingPageCmp { } } -@Component({selector: 'hello-cmp'}) -@View({template: 'hello'}) +@Component({ + selector: 'hello-cmp', + template: 'hello' +}) class HelloCmp { } -@Component({selector: 'hello2-cmp'}) -@View({template: 'hello2'}) +@Component({ + selector: 'hello2-cmp', + template: 'hello2' +}) class Hello2Cmp { } @@ -437,8 +443,8 @@ function parentCmpLoader() { return PromiseWrapper.resolve(ParentCmp); } -@Component({selector: 'parent-cmp'}) -@View({ +@Component({ + selector: 'parent-cmp', template: `{ Grandchild Better Grandchild }`, @@ -452,8 +458,8 @@ class ParentCmp { constructor(public router: Router) {} } -@Component({selector: 'book-cmp'}) -@View({ +@Component({ + selector: 'book-cmp', template: `{{title}} | `, directives: ROUTER_DIRECTIVES @@ -464,8 +470,8 @@ class BookCmp { constructor(params: RouteParams) { this.title = params.get('title'); } } -@Component({selector: 'book-cmp'}) -@View({ +@Component({ + selector: 'book-cmp', template: `{{title}} | `, directives: ROUTER_DIRECTIVES @@ -476,8 +482,8 @@ class NoPrefixBookCmp { constructor(params: RouteParams) { this.title = params.get('title'); } } -@Component({selector: 'book-cmp'}) -@View({ +@Component({ + selector: 'book-cmp', template: `{{title}} | `, directives: ROUTER_DIRECTIVES @@ -488,8 +494,8 @@ class AmbiguousBookCmp { constructor(params: RouteParams) { this.title = params.get('title'); } } -@Component({selector: 'aux-cmp'}) -@View({ +@Component({ + selector: 'aux-cmp', template: `aside | | aside `,