diff --git a/modules/angular2/src/core/directives.ts b/modules/angular2/src/core/directives.ts index 745a473b53..131b4675fb 100644 --- a/modules/angular2/src/core/directives.ts +++ b/modules/angular2/src/core/directives.ts @@ -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]);