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,8 +1,7 @@
import {Component, View, NgIf} from 'angular2/angular2';
import {Component} from 'angular2/core';
@Component({selector: 'animate-app'})
@View({
directives: [NgIf],
@Component({
selector: 'animate-app',
template: `
<h1>The box is {{visible ? 'visible' : 'hidden'}}</h1>
<div class="ng-animate box" *ngIf="visible"></div>

View File

@ -1,4 +1,4 @@
import {Component, provide} from 'angular2/angular2';
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {
RouteConfig,

View File

@ -1,10 +1,9 @@
import {Component, View, NgFor} from 'angular2/angular2';
import {Component} from 'angular2/core';
import {Http, Response} from 'angular2/http';
import 'rxjs/add/operator/map';
@Component({selector: 'http-app'})
@View({
directives: [NgFor],
@Component({
selector: 'http-app',
template: `
<h1>people</h1>
<ul class="people">

View File

@ -1,10 +1,9 @@
import {Component, View, NgFor} from 'angular2/angular2';
import {Component} from 'angular2/core';
import {Jsonp, Response} from 'angular2/http';
import {ObservableWrapper} from 'angular2/src/facade/async';
@Component({selector: 'jsonp-app'})
@View({
directives: [NgFor],
@Component({
selector: 'jsonp-app',
template: `
<h1>people</h1>
<ul class="people">

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';

View File

@ -1,4 +1,4 @@
import {Injectable} from 'angular2/angular2';
import {Injectable} from 'angular2/core';
import {ListWrapper, Predicate} from 'angular2/src/facade/collection';
// base model for RecordStore

View File

@ -1,5 +1,5 @@
import {Component, Input, Output, EventEmitter} from 'angular2/angular2';
import {UpgradeAdapter} from 'angular2/angular2';
import {Component, Input, Output, EventEmitter} from 'angular2/core';
import {UpgradeAdapter} from 'angular2/upgrade';
import * as angular from '../../../angular2/src/upgrade/angular_js';
var styles = [

View File

@ -1,11 +1,10 @@
import {NgZone, NgFor, Component, View, NgIf, FORM_DIRECTIVES} from 'angular2/angular2';
import {Component} from 'angular2/core';
import {BitmapService} from './services/bitmap';
import {EventListener} from 'angular2/src/facade/browser';
import {FileReader, Uint8ArrayWrapper} from './file_api';
import {TimerWrapper} from 'angular2/src/facade/async';
@Component({selector: 'image-demo', viewProviders: [BitmapService]})
@View({templateUrl: 'image_demo.html', directives: [NgFor, NgIf, FORM_DIRECTIVES]})
@Component({selector: 'image-demo', viewProviders: [BitmapService], templateUrl: 'image_demo.html'})
export class ImageDemo {
images = [];
fileInput: String;

View File

@ -1,5 +1,5 @@
/// <reference path="../bitmap.d.ts" /> /// <reference path="../b64.d.ts" />
import {Injectable} from 'angular2/angular2';
import {Injectable} from 'angular2/core';
declare var base64js;
// Temporary fix for Typescript issue #4220 (https://github.com/Microsoft/TypeScript/issues/4220)

View File

@ -1,4 +1,4 @@
import {Component, EventEmitter, Input, Output} from 'angular2/angular2';
import {Component, EventEmitter, Input, Output} from 'angular2/core';
import {ObservableWrapper} from 'angular2/src/facade/async';
@Component({selector: 'zippy', templateUrl: 'zippy.html'})