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