parent
adbfd29fd7
commit
a87ebb28e2
|
@ -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.
|
* application.
|
||||||
*
|
*
|
||||||
* This collection can be used to quickly enumerate all the built-in directives in the `@View`
|
* This collection can be used to quickly enumerate all the built-in directives in the `directives`
|
||||||
* annotation. For example,
|
* property of the `@View` annotation.
|
||||||
* instead of writing:
|
|
||||||
*
|
*
|
||||||
* ```
|
* ### 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 {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2';
|
||||||
* import {OtherDirective} from 'myDirectives';
|
* import {OtherDirective} from './myDirectives';
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
* selector: 'my-component'
|
* selector: 'my-component'
|
||||||
|
@ -46,9 +49,9 @@ export * from './directives/observable_list_diff';
|
||||||
* ```
|
* ```
|
||||||
* one could import all the core directives at once:
|
* one could import all the core directives at once:
|
||||||
*
|
*
|
||||||
* ```
|
* ```typescript
|
||||||
* import {CORE_DIRECTIVES} from 'angular2/angular2';
|
* import {CORE_DIRECTIVES} from 'angular2/angular2';
|
||||||
* import {OtherDirective} from 'myDirectives';
|
* import {OtherDirective} from './myDirectives';
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
* selector: 'my-component'
|
* selector: 'my-component'
|
||||||
|
@ -61,7 +64,6 @@ export * from './directives/observable_list_diff';
|
||||||
* ...
|
* ...
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
export const CORE_DIRECTIVES: Type[] = CONST_EXPR(
|
export const CORE_DIRECTIVES: Type[] = CONST_EXPR(
|
||||||
[NgClass, NgFor, NgIf, NgNonBindable, NgStyle, NgSwitch, NgSwitchWhen, NgSwitchDefault]);
|
[NgClass, NgFor, NgIf, NgNonBindable, NgStyle, NgSwitch, NgSwitchWhen, NgSwitchDefault]);
|
||||||
|
|
Loading…
Reference in New Issue