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

@ -2,7 +2,7 @@
Bootstrapping
@cheatsheetIndex 0
@description
{@target js ts}`import {bootstrap} from 'angular2/angular2';`{@endtarget}
{@target js ts}`import {bootstrap} from 'angular2/platform/browser';`{@endtarget}
{@target dart}`import 'package:angular2/bootstrap.dart';`{@endtarget}
@cheatsheetItem

View File

@ -2,8 +2,8 @@
Built-in directives
@cheatsheetIndex 2
@description
{@target js ts}`import {NgIf, ...} from 'angular2/angular2';`{@endtarget}
{@target dart}`import 'package:angular2/angular2.dart';`{@endtarget}
{@target js ts}`import {NgIf, ...} from 'angular2/common';`{@endtarget}
{@target dart}`import 'package:angular2/common.dart';`{@endtarget}
@cheatsheetItem
syntax:

View File

@ -2,8 +2,8 @@
Class decorators
@cheatsheetIndex 4
@description
{@target js ts}`import {Directive, ...} from 'angular2/angular2';`{@endtarget}
{@target dart}`import 'package:angular2/angular2.dart';`{@endtarget}
{@target js ts}`import {Directive, ...} from 'angular2/core';`{@endtarget}
{@target dart}`import 'package:angular2/core.dart';`{@endtarget}
@cheatsheetItem
syntax(js ts):

View File

@ -2,8 +2,8 @@
Dependency injection configuration
@cheatsheetIndex 9
@description
{@target js ts}`import {provide} from 'angular2/angular2';`{@endtarget}
{@target dart}`import 'package:angular2/angular2.dart';`{@endtarget}
{@target js ts}`import {provide} from 'angular2/core';`{@endtarget}
{@target dart}`import 'package:angular2/core.dart';`{@endtarget}
@cheatsheetItem
syntax:

View File

@ -2,8 +2,8 @@
Class field decorators for directives and components
@cheatsheetIndex 7
@description
{@target js ts}`import {Input, ...} from 'angular2/angular2';`{@endtarget}
{@target dart}`import 'package:angular2/angular2.dart';`{@endtarget}
{@target js ts}`import {Input, ...} from 'angular2/core';`{@endtarget}
{@target dart}`import 'package:angular2/core.dart';`{@endtarget}
@cheatsheetItem
syntax:

View File

@ -2,8 +2,8 @@
Forms
@cheatsheetIndex 3
@description
{@target js ts}`import {FORM_DIRECTIVES} from 'angular2/angular2';`{@endtarget}
{@target dart}`import 'package:angular2/angular2.dart';`{@endtarget}
{@target js ts}`import {FORM_DIRECTIVES} from 'angular2/common';`{@endtarget}
{@target dart}`import 'package:angular2/common.dart';`{@endtarget}
@cheatsheetItem
syntax:

View File

@ -3,7 +3,7 @@ Routing and navigation
@cheatsheetIndex 10
@description
{@target js ts}`import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS, ...} from 'angular2/router';`{@endtarget}
{@target dart}`import 'package:angular2/angular2.dart';`{@endtarget}
{@target dart}`import 'package:angular2/router.dart';`{@endtarget}
@cheatsheetItem

View File

@ -44,7 +44,9 @@ export {URLSearchParams} from './src/http/url_search_params';
* ### Example ([live demo](http://plnkr.co/edit/snj7Nv?p=preview))
*
* ```
* import {bootstrap, Component, NgFor, View} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {NgFor} from 'angular2/common';
* import {HTTP_PROVIDERS, Http} from 'angular2/http';
*
* @Component({
@ -98,7 +100,8 @@ export {URLSearchParams} from './src/http/url_search_params';
* ### Example ([live demo](http://plnkr.co/edit/aCMEXi?p=preview))
*
* ```
* import {provide, bootstrap} from 'angular2/angular2';
* import {provide} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {HTTP_PROVIDERS, BaseRequestOptions, RequestOptions} from 'angular2/http';
*
* class MyOptions extends BaseRequestOptions {
@ -115,7 +118,8 @@ export {URLSearchParams} from './src/http/url_search_params';
* ### Example ([live demo](http://plnkr.co/edit/7LWALD?p=preview))
*
* ```
* import {provide, Injector} from 'angular2/angular2';
* import {provide} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {HTTP_PROVIDERS, Http, Response, XHRBackend} from 'angular2/http';
* import {MockBackend} from 'angular2/http/testing';
*
@ -175,7 +179,8 @@ export const HTTP_BINDINGS = HTTP_PROVIDERS;
* ### Example ([live demo](http://plnkr.co/edit/vmeN4F?p=preview))
*
* ```
* import {Component, NgFor, View} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {NgFor} from 'angular2/common';
* import {JSONP_PROVIDERS, Jsonp} from 'angular2/http';
*
* @Component({
@ -222,7 +227,8 @@ export const HTTP_BINDINGS = HTTP_PROVIDERS;
* ### Example ([live demo](http://plnkr.co/edit/TFug7x?p=preview))
*
* ```
* import {provide, bootstrap} from 'angular2/angular2';
* import {provide} from 'angular2/core';
* import {bootstrap} from 'angular2/platform/browser';
* import {JSONP_PROVIDERS, BaseRequestOptions, RequestOptions} from 'angular2/http';
*
* class MyOptions extends BaseRequestOptions {
@ -239,7 +245,7 @@ export const HTTP_BINDINGS = HTTP_PROVIDERS;
* ### Example ([live demo](http://plnkr.co/edit/HDqZWL?p=preview))
*
* ```
* import {provide, Injector} from 'angular2/angular2';
* import {provide, Injector} from 'angular2/core';
* import {JSONP_PROVIDERS, Jsonp, Response, JSONPBackend} from 'angular2/http';
* import {MockBackend} from 'angular2/http/testing';
*

View File

@ -41,7 +41,7 @@ import {BaseException} from 'angular2/src/facade/exceptions';
* ### Example ([live demo](http://plnkr.co/edit/iRUP8B5OUbxCWQ3AcIDm))
*
* ```
* import {Component} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {ROUTER_DIRECTIVES, ROUTER_PROVIDERS, RouteConfig} from 'angular2/router';
*
* @Component({directives: [ROUTER_DIRECTIVES]})
@ -63,7 +63,7 @@ export const ROUTER_DIRECTIVES: any[] = CONST_EXPR([RouterOutlet, RouterLink]);
* ### Example ([live demo](http://plnkr.co/edit/iRUP8B5OUbxCWQ3AcIDm))
*
* ```
* import {Component} from 'angular2/angular2';
* import {Component} from 'angular2/core';
* import {
* ROUTER_DIRECTIVES,
* ROUTER_PROVIDERS,

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,