forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdirectives.ts
More file actions
77 lines (73 loc) · 2.47 KB
/
Copy pathdirectives.ts
File metadata and controls
77 lines (73 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/**
* @module
* @description
* Common directives shipped with Angular.
*/
import {CONST_EXPR, Type} from './src/facade/lang';
export * from './src/directives/ng_style';
// remove when https://github.com/systemjs/systemjs/issues/712 is closed
import * as ngClassImport from './src/directives/ng_class';
import * as ngForImport from './src/directives/ng_for';
import * as ngIfImport from './src/directives/ng_if';
import * as ngNonImport from './src/directives/ng_non_bindable';
import * as ngSwitchImport from './src/directives/ng_switch';
export var NgClass = ngClassImport.NgClass;
export var NgFor = ngForImport.NgFor;
export var RecordViewTuple = ngForImport.RecordViewTuple;
export var NgIf = ngIfImport.NgIf;
export var NgNonBindable = ngNonImport.NgNonBindable;
export var NgSwitch = ngSwitchImport.NgSwitch;
export var NgSwitchWhen = ngSwitchImport.NgSwitchWhen;
export var NgSwitchDefault = ngSwitchImport.NgSwitchDefault;
export type NgClass = ngClassImport.NgClass;
export type NgFor = ngForImport.NgFor;
export type RecordViewTuple = ngForImport.RecordViewTuple;
export type NgIf = ngIfImport.NgIf;
export type NgNonBindable = ngNonImport.NgNonBindable;
export type NgSwitch = ngSwitchImport.NgSwitch;
export type NgSwitchWhen = ngSwitchImport.NgSwitchWhen;
export type NgSwitchDefault = ngSwitchImport.NgSwitchDefault;
/**
* A collection of the 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:
*
* ```
* import {If, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2';
* import {OtherDirective} from 'myDirectives';
*
* @Component({
* selector: 'my-component'
* })
* @View({
* templateUrl: 'myComponent.html',
* directives: [If, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, OtherDirective]
* })
* export class MyComponent {
* ...
* }
* ```
* one could enumerate all the core directives at once:
*
* ```
* import {coreDirectives} from 'angular2/angular2';
* import {OtherDirective} from 'myDirectives';
*
* @Component({
* selector: 'my-component'
* })
* @View({
* templateUrl: 'myComponent.html',
* directives: [coreDirectives, OtherDirective]
* })
* export class MyComponent {
* ...
* }
* ```
*
*/
export const CORE_DIRECTIVES: List<Type> =
CONST_EXPR([NgClass, NgFor, NgIf, NgNonBindable, NgSwitch, NgSwitchWhen, NgSwitchDefault]);