docs(core): replace angular2/angular2 with the right barrel import.

Related to #5710
Closes #5847
This commit is contained in:
Tobias Bosch
2015-12-11 15:01:37 -08:00
parent 200dc00dbb
commit b1b0593ddf
28 changed files with 60 additions and 46 deletions

View File

@ -17,7 +17,7 @@ import {CORE_DIRECTIVES} from './directives';
*
* ```typescript
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, NgModel, NgForm} from
* 'angular2/angular2';
* 'angular2/common';
* import {OtherDirective} from './myDirectives';
*
* @Component({
@ -33,7 +33,7 @@ import {CORE_DIRECTIVES} from './directives';
* one could import all the common directives at once:
*
* ```typescript
* import {COMMON_DIRECTIVES} from 'angular2/angular2';
* import {COMMON_DIRECTIVES} from 'angular2/common';
* import {OtherDirective} from './myDirectives';
*
* @Component({
@ -46,4 +46,4 @@ import {CORE_DIRECTIVES} from './directives';
* }
* ```
*/
export const COMMON_DIRECTIVES: Type[][] = CONST_EXPR([CORE_DIRECTIVES, FORM_DIRECTIVES]);
export const COMMON_DIRECTIVES: Type[][] = CONST_EXPR([CORE_DIRECTIVES, FORM_DIRECTIVES]);

View File

@ -17,7 +17,7 @@ import {NgSwitch, NgSwitchWhen, NgSwitchDefault} from './ng_switch';
* Instead of writing:
*
* ```typescript
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2';
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/common';
* import {OtherDirective} from './myDirectives';
*
* @Component({
@ -32,7 +32,7 @@ import {NgSwitch, NgSwitchWhen, NgSwitchDefault} from './ng_switch';
* one could import all the core directives at once:
*
* ```typescript
* import {CORE_DIRECTIVES} from 'angular2/angular2';
* import {CORE_DIRECTIVES} from 'angular2/common';
* import {OtherDirective} from './myDirectives';
*
* @Component({

View File

@ -31,7 +31,8 @@ import {StringMapWrapper, isListLikeIterable} from 'angular2/src/facade/collecti
* ### Example ([live demo](http://plnkr.co/edit/a4YdtmWywhJ33uqfpPPn?p=preview)):
*
* ```
* import {Component, NgClass} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {NgClass} from 'angular2/common';
*
* @Component({
* selector: 'toggle-button',

View File

@ -23,7 +23,8 @@ import {isPresent, isBlank, print} from 'angular2/src/facade/lang';
* ### Example ([live demo](http://plnkr.co/edit/YamGS6GkUh9GqWNQhCyM?p=preview)):
*
* ```
* import {Component, NgStyle} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {NgStyle} from 'angular2/common';
*
* @Component({
* selector: 'ngStyle-example',

View File

@ -13,7 +13,7 @@
* The `RepeatPipe` below repeats the value as many times as indicated by the first argument:
*
* ```
* import {Pipe, PipeTransform} from 'angular2/angular2';
* import {Pipe, PipeTransform} from 'angular2/core';
*
* @Pipe({name: 'repeat'})
* export class RepeatPipe implements PipeTransform {

View File

@ -243,7 +243,7 @@ export interface DoCheck { ngDoCheck(); }
* the interval when the binding is destroyed or the countdown completes.
*
* ```
* import {OnDestroy, Pipe, PipeTransform} from 'angular2/angular2'
* import {OnDestroy, Pipe, PipeTransform} from 'angular2/core'
* @Pipe({name: 'countdown', pure: false})
* class CountDown implements PipeTransform, OnDestroy {
* remainingTime:Number;

View File

@ -253,7 +253,7 @@ export interface ComponentFactory {
* ### Example as TypeScript Decorator
*
* ```
* import {Component, View} from "angular2/angular2";
* import {Component, View} from "angular2/core";
*
* @Component({...})
* @View({...})
@ -356,7 +356,7 @@ export interface AttributeFactory {
* ### Example as TypeScript Decorator
*
* ```
* import {Query, QueryList, Component} from "angular2/angular2";
* import {Query, QueryList, Component} from "angular2/core";
*
* @Component({...})
* class MyComponent {

View File

@ -8,7 +8,7 @@ import {CONST_EXPR} from "angular2/src/facade/lang";
* ### Example
*
* ```typescript
* import {PLATFORM_DIRECTIVES} from 'angular2/angular2';
* import {PLATFORM_DIRECTIVES} from 'angular2/core';
* import {OtherDirective} from './myDirectives';
*
* @Component({
@ -34,7 +34,7 @@ export const PLATFORM_DIRECTIVES: OpaqueToken = CONST_EXPR(new OpaqueToken("Plat
* ### Example
*
* ```typescript
* import {PLATFORM_PIPES} from 'angular2/angular2';
* import {PLATFORM_PIPES} from 'angular2/core';
* import {OtherPipe} from './myPipe';
*
* @Component({

View File

@ -34,7 +34,8 @@ export class NgZoneError {
*
* ### Example ([live demo](http://plnkr.co/edit/lY9m8HLy7z06vDoUaSN2?p=preview))
* ```
* import {Component, View, NgIf, NgZone} from 'angular2/angular2';
* import {Component, View, NgZone} from 'angular2/core';
* import {NgIf} from 'angular2/common';
*
* @Component({
* selector: 'ng-zone-demo'.

View File

@ -117,7 +117,8 @@ export class RequestOptions {
* ### Example ([live demo](http://plnkr.co/edit/LEKVSx?p=preview))
*
* ```typescript
* import {provide, bootstrap} from 'angular2/angular2';
* import {provide} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {HTTP_PROVIDERS, Http, BaseRequestOptions, RequestOptions} from 'angular2/http';
* import {App} from './myapp';
*

View File

@ -115,7 +115,8 @@ export class ResponseOptions {
* ### Example ([live demo](http://plnkr.co/edit/qv8DLT?p=preview))
*
* ```typescript
* import {provide, bootstrap} from 'angular2/angular2';
* import {provide} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {HTTP_PROVIDERS, Headers, Http, BaseResponseOptions, ResponseOptions} from
* 'angular2/http';
* import {App} from './myapp';

View File

@ -2,7 +2,7 @@
// require('reflect-metadata');
// require('es6-shim');
// import {HTTP_PROVIDERS, JSONP_PROVIDERS, Http, Jsonp} from './http';
// import {Injector} from 'angular2/angular2';
// import {Injector} from 'angular2/core';
// export * from './http';
// /**

View File

@ -25,7 +25,7 @@ import {
* where it may be useful to generate a `Request` with arbitrary headers and search params.
*
* ```typescript
* import {Injectable, Injector} from 'angular2/angular2';
* import {Injectable, Injector} from 'angular2/core';
* import {HTTP_PROVIDERS, Http, Request, RequestMethod} from 'angular2/http';
*
* @Injectable()

View File

@ -21,7 +21,7 @@ import {PlatformLocation} from './platform_location';
* ### Example
*
* ```
* import {Component, provide} from 'angular2/angular2';
* import {Component, provide} from 'angular2/core';
* import {
* ROUTER_DIRECTIVES,
* ROUTER_PROVIDERS,

View File

@ -12,7 +12,8 @@ import {Promise, PromiseWrapper} from 'angular2/src/facade/async';
* ### Example
*
* ```
* import {bootstrap, Component} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
*
* @Component({directives: [ROUTER_DIRECTIVES]})
@ -46,7 +47,8 @@ export class RouteParams {
* ### Example
*
* ```
* import {bootstrap, Component, View} from 'angular2/angular2';
* import {Component, View} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {Router, ROUTER_DIRECTIVES, routerBindings, RouteConfig} from 'angular2/router';
*
* @Component({...})
@ -86,7 +88,8 @@ export var BLANK_ROUTE_DATA = new RouteData();
* ### Example
*
* ```
* import {bootstrap, Component} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {Router, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
*
* @Component({directives: [ROUTER_DIRECTIVES]})

View File

@ -21,7 +21,7 @@ import {Injectable, Inject} from 'angular2/core';
* ### Example
*
* ```
* import {Component} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {
* ROUTER_DIRECTIVES,
* ROUTER_PROVIDERS,

View File

@ -40,7 +40,7 @@ export abstract class LocationStrategy {
* ### Example
*
* ```
* import {Component} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
*
* @Component({directives: [ROUTER_DIRECTIVES]})

View File

@ -30,7 +30,7 @@ import {PlatformLocation} from './platform_location';
* ### Example
*
* ```
* import {Component, provide} from 'angular2/angular2';
* import {Component, provide} from 'angular2/core';
* import {
* APP_BASE_HREF
* ROUTER_DIRECTIVES,

View File

@ -47,7 +47,7 @@ var _resolveToNull = PromiseWrapper.resolve(null);
* ### Example ([live demo](http://plnkr.co/edit/iRUP8B5OUbxCWQ3AcIDm))
*
* ```
* import {Component} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {
* ROUTER_DIRECTIVES,
* ROUTER_PROVIDERS,