refactor(examples): remove imports from 'angular2/angular2'
Closes #5803
This commit is contained in:
parent
d26c338aa0
commit
df6d2d1e23
|
@ -1,4 +1,4 @@
|
|||
import {Component, provide, Observable} from 'angular2/angular2';
|
||||
import {Component, provide, Observable} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
|
||||
// #docregion AsyncPipe
|
||||
|
@ -6,7 +6,7 @@ import {bootstrap} from 'angular2/bootstrap';
|
|||
selector: 'async-example',
|
||||
template: `<div>
|
||||
<p>Wait for it... {{ greeting | async }}</p>
|
||||
<button (click)="clicked()">{{ arrived ? 'Reset' : 'Resolve' }}</button>
|
||||
<button (click)="clicked()">{{ arrived ? 'Reset' : 'Resolve' }}</button>
|
||||
</div>`
|
||||
})
|
||||
export class AsyncPipeExample {
|
||||
|
@ -44,7 +44,7 @@ class Task {
|
|||
@Component({
|
||||
selector: 'example-app',
|
||||
directives: [AsyncPipeExample],
|
||||
template: `
|
||||
template: `
|
||||
<h1>AsyncPipe Example</h1>
|
||||
<async-example></async-example>
|
||||
`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, provide} from 'angular2/angular2';
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
|
||||
// #docregion DatePipe
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, provide} from 'angular2/angular2';
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
|
||||
// #docregion JsonPipe
|
||||
|
@ -19,7 +19,7 @@ export class JsonPipeExample {
|
|||
@Component({
|
||||
selector: 'example-app',
|
||||
directives: [JsonPipeExample],
|
||||
template: `
|
||||
template: `
|
||||
<h1>JsonPipe Example</h1>
|
||||
<json-example></json-example>
|
||||
`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, provide} from 'angular2/angular2';
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
|
||||
// #docregion LowerUpperPipe
|
||||
|
@ -19,7 +19,7 @@ export class LowerUpperPipeExample {
|
|||
@Component({
|
||||
selector: 'example-app',
|
||||
directives: [LowerUpperPipeExample],
|
||||
template: `
|
||||
template: `
|
||||
<h1>LowercasePipe & UppercasePipe Example</h1>
|
||||
<lowerupper-example></lowerupper-example>
|
||||
`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, provide} from 'angular2/angular2';
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
|
||||
// #docregion NumberPipe
|
||||
|
@ -48,7 +48,7 @@ export class CurrencyPipeExample {
|
|||
@Component({
|
||||
selector: 'example-app',
|
||||
directives: [NumberPipeExample, PercentPipeExample, CurrencyPipeExample],
|
||||
template: `
|
||||
template: `
|
||||
<h1>Numeric Pipe Examples</h1>
|
||||
<h2>NumberPipe Example</h2>
|
||||
<number-example></number-example>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Component, provide} from 'angular2/angular2';
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
|
||||
// #docregion SlicePipe_string
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// #docregion enableDevMode
|
||||
import {bootstrap, enableDevMode} from 'angular2/angular2';
|
||||
import {enableDevMode} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {MyComponent} from 'my_component';
|
||||
|
||||
enableDevMode();
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {bootstrap, provide, Component} from 'angular2/angular2';
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {
|
||||
CanActivate,
|
||||
RouteConfig,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {provide, bootstrap, Component} from 'angular2/angular2';
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {
|
||||
CanDeactivate,
|
||||
RouteConfig,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {Component, provide, bootstrap} from 'angular2/angular2';
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {
|
||||
OnActivate,
|
||||
ComponentInstruction,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {Component, Injectable, NgFor, provide, bootstrap} from 'angular2/angular2';
|
||||
import {Component, Injectable, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {
|
||||
OnDeactivate,
|
||||
ComponentInstruction,
|
||||
|
@ -43,7 +44,7 @@ class MyCmp implements OnDeactivate {
|
|||
<p *ngFor="#logItem of logService.logs">{{ logItem }}</p>
|
||||
</div>
|
||||
`,
|
||||
directives: [ROUTER_DIRECTIVES, NgFor]
|
||||
directives: [ROUTER_DIRECTIVES]
|
||||
})
|
||||
@RouteConfig([
|
||||
{path: '/', component: MyCmp, name: 'HomeCmp'},
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import {bootstrap, Component, provide} from 'angular2/angular2';
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/bootstrap';
|
||||
import {
|
||||
CanActivate,
|
||||
RouteConfig,
|
||||
|
|
Loading…
Reference in New Issue