refactor(playground): remove imports from 'angular2/angular2'

Part of #5710

Closes #5798
This commit is contained in:
Pawel Kozlowski
2015-12-10 16:24:34 +01:00
parent df6d2d1e23
commit 8d3e5596dc
11 changed files with 28 additions and 31 deletions

View File

@ -1,4 +1,4 @@
import {NgIf, NgFor, EventEmitter, Component, View, Inject, Injectable} from 'angular2/angular2';
import {Component, Injectable} from 'angular2/core';
import {
RouterLink,
RouteConfig,
@ -89,8 +89,7 @@ class DbService {
}
}
@Component({selector: 'inbox-detail'})
@View({templateUrl: 'inbox-detail.html', directives: [NgFor, RouterLink]})
@Component({selector: 'inbox-detail', directives: [RouterLink], templateUrl: 'inbox-detail.html'})
class InboxDetailCmp {
record: InboxRecord = new InboxRecord();
ready: boolean = false;
@ -101,8 +100,7 @@ class InboxDetailCmp {
}
}
@Component({selector: 'inbox'})
@View({templateUrl: 'inbox.html', directives: [NgFor, RouterLink]})
@Component({selector: 'inbox', templateUrl: 'inbox.html', directives: [RouterLink]})
class InboxCmp {
items: InboxRecord[] = [];
ready: boolean = false;
@ -127,8 +125,7 @@ class InboxCmp {
}
@Component({selector: 'drafts'})
@View({templateUrl: 'drafts.html', directives: [NgFor, RouterLink]})
@Component({selector: 'drafts', templateUrl: 'drafts.html', directives: [RouterLink]})
class DraftsCmp {
items: InboxRecord[] = [];
ready: boolean = false;
@ -141,8 +138,12 @@ class DraftsCmp {
}
}
@Component({selector: 'inbox-app', viewProviders: [DbService]})
@View({templateUrl: 'inbox-app.html', directives: [RouterOutlet, RouterLink]})
@Component({
selector: 'inbox-app',
viewProviders: [DbService],
templateUrl: 'inbox-app.html',
directives: [RouterOutlet, RouterLink]
})
@RouteConfig([
new Route({path: '/', component: InboxCmp, name: 'Inbox'}),
new Route({path: '/drafts', component: DraftsCmp, name: 'Drafts'}),

View File

@ -1,5 +1,5 @@
import {InboxApp} from './inbox-app';
import {provide} from 'angular2/angular2';
import {provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {ROUTER_PROVIDERS, HashLocationStrategy, LocationStrategy} from 'angular2/router';