| 
									
										
										
										
											2015-04-10 12:45:02 +02:00
										 |  |  | /** | 
					
						
							|  |  |  |  * @module | 
					
						
							|  |  |  |  * @description | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  |  * Common directives shipped with Angular. | 
					
						
							| 
									
										
										
										
											2015-04-10 12:45:02 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-20 14:28:25 -07:00
										 |  |  | import {CONST_EXPR, Type} from './src/core/facade/lang'; | 
					
						
							|  |  |  | import {NgClass} from './src/core/directives/ng_class'; | 
					
						
							|  |  |  | import {NgFor} from './src/core/directives/ng_for'; | 
					
						
							|  |  |  | import {NgIf} from './src/core/directives/ng_if'; | 
					
						
							|  |  |  | import {NgNonBindable} from './src/core/directives/ng_non_bindable'; | 
					
						
							|  |  |  | import {NgSwitch, NgSwitchWhen, NgSwitchDefault} from './src/core/directives/ng_switch'; | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-20 14:28:25 -07:00
										 |  |  | export * from './src/core/directives/ng_class'; | 
					
						
							|  |  |  | export * from './src/core/directives/ng_for'; | 
					
						
							|  |  |  | export * from './src/core/directives/ng_if'; | 
					
						
							|  |  |  | export * from './src/core/directives/ng_non_bindable'; | 
					
						
							|  |  |  | export * from './src/core/directives/ng_style'; | 
					
						
							|  |  |  | export * from './src/core/directives/ng_switch'; | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							| 
									
										
										
										
											2015-05-20 17:19:46 -07:00
										 |  |  |  * A collection of the Angular core directives that are likely to be used in each and every Angular | 
					
						
							|  |  |  |  * application. | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2015-05-20 17:19:46 -07:00
										 |  |  |  * This collection can be used to quickly enumerate all the built-in directives in the `@View` | 
					
						
							|  |  |  |  * annotation. For example, | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  |  * instead of writing: | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * ```
 | 
					
						
							| 
									
										
										
										
											2015-08-22 17:44:00 +02:00
										 |  |  |  * import {NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2'; | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  |  * import {OtherDirective} from 'myDirectives'; | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @Component({ | 
					
						
							|  |  |  |  *  selector: 'my-component' | 
					
						
							|  |  |  |  * }) | 
					
						
							|  |  |  |  * @View({ | 
					
						
							|  |  |  |  *   templateUrl: 'myComponent.html', | 
					
						
							| 
									
										
										
										
											2015-08-22 17:44:00 +02:00
										 |  |  |  *   directives: [NgClass, NgIf, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, OtherDirective] | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  |  * }) | 
					
						
							|  |  |  |  * export class MyComponent { | 
					
						
							|  |  |  |  *   ... | 
					
						
							|  |  |  |  * } | 
					
						
							|  |  |  |  * ```
 | 
					
						
							| 
									
										
										
										
											2015-08-22 17:44:00 +02:00
										 |  |  |  * one could import all the core directives at once: | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  |  * | 
					
						
							| 
									
										
										
										
											2015-05-15 13:54:41 +01:00
										 |  |  |  * ```
 | 
					
						
							| 
									
										
										
										
											2015-08-22 17:44:00 +02:00
										 |  |  |  * import {CORE_DIRECTIVES} from 'angular2/angular2'; | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  |  * import {OtherDirective} from 'myDirectives'; | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @Component({ | 
					
						
							|  |  |  |  *  selector: 'my-component' | 
					
						
							|  |  |  |  * }) | 
					
						
							|  |  |  |  * @View({ | 
					
						
							|  |  |  |  *   templateUrl: 'myComponent.html', | 
					
						
							| 
									
										
										
										
											2015-08-22 17:44:00 +02:00
										 |  |  |  *   directives: [CORE_DIRECTIVES, OtherDirective] | 
					
						
							| 
									
										
										
										
											2015-04-24 14:21:39 +02:00
										 |  |  |  * }) | 
					
						
							|  |  |  |  * export class MyComponent { | 
					
						
							|  |  |  |  *   ... | 
					
						
							|  |  |  |  * } | 
					
						
							|  |  |  |  * ```
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  */ | 
					
						
							| 
									
										
										
										
											2015-08-28 11:29:19 -07:00
										 |  |  | export const CORE_DIRECTIVES: Type[] = | 
					
						
							| 
									
										
										
										
											2015-08-07 16:18:26 +02:00
										 |  |  |     CONST_EXPR([NgClass, NgFor, NgIf, NgNonBindable, NgSwitch, NgSwitchWhen, NgSwitchDefault]); |