X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions modules/playground/src/animate/animate-app.ts
Original file line number Diff line number Diff line change
@@ -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>
Expand Down
2 changes: 1 addition & 1 deletion modules/playground/src/hash_routing/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, provide} from 'angular2/angular2';
import {Component, provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {
RouteConfig,
Expand Down
7 changes: 3 additions & 4 deletions modules/playground/src/http/http_comp.ts
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
7 changes: 3 additions & 4 deletions modules/playground/src/jsonp/jsonp_comp.ts
Original file line number Diff line number Diff line change
@@ -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">
Expand Down
19 changes: 10 additions & 9 deletions modules/playground/src/routing/inbox-app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {NgIf, NgFor, EventEmitter, Component, View, Inject, Injectable} from 'angular2/angular2';
import {Component, Injectable} from 'angular2/core';
import {
RouterLink,
RouteConfig,
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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'}),
Expand Down
2 changes: 1 addition & 1 deletion modules/playground/src/routing/index.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
2 changes: 1 addition & 1 deletion modules/playground/src/todo/services/TodoStore.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions modules/playground/src/upgrade/index.ts
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
5 changes: 2 additions & 3 deletions modules/playground/src/web_workers/images/index_common.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion modules/playground/src/zippy_component/zippy.ts
Original file line number Diff line number Diff line change
@@ -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'})
Expand Down
X Tutup