docs(CORE_DIRECTIVES): improve docs for CORE_DIRECTIVES

Closes #4310
This commit is contained in:
Pawel Kozlowski 2015-09-22 14:27:27 +02:00
parent adbfd29fd7
commit a87ebb28e2
1 changed files with 11 additions and 9 deletions

View File

@ -22,16 +22,19 @@ export * from './directives/observable_list_diff';
/**
* A collection of the Angular core directives that are likely to be used in each and every Angular
* A collection of Angular core directives that are likely to be used in each and every Angular
* application.
*
* This collection can be used to quickly enumerate all the built-in directives in the `@View`
* annotation. For example,
* instead of writing:
* This collection can be used to quickly enumerate all the built-in directives in the `directives`
* property of the `@View` annotation.
*
* ```
* ### Example ([live demo](http://plnkr.co/edit/yakGwpCdUkg0qfzX5m8g?p=preview))
*
* Instead of writing:
*
* ```typescript
* import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2';
* import {OtherDirective} from 'myDirectives';
* import {OtherDirective} from './myDirectives';
*
* @Component({
* selector: 'my-component'
@ -46,9 +49,9 @@ export * from './directives/observable_list_diff';
* ```
* one could import all the core directives at once:
*
* ```
* ```typescript
* import {CORE_DIRECTIVES} from 'angular2/angular2';
* import {OtherDirective} from 'myDirectives';
* import {OtherDirective} from './myDirectives';
*
* @Component({
* selector: 'my-component'
@ -61,7 +64,6 @@ export * from './directives/observable_list_diff';
* ...
* }
* ```
*
*/
export const CORE_DIRECTIVES: Type[] = CONST_EXPR(
[NgClass, NgFor, NgIf, NgNonBindable, NgStyle, NgSwitch, NgSwitchWhen, NgSwitchDefault]);