refactor(playground): remove imports from 'angular2/angular2'
Part of #5710 Closes #5798
This commit is contained in:
@ -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'}),
|
||||
|
@ -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';
|
||||
|
||||
|
Reference in New Issue
Block a user