2015-11-07 01:34:07 +00:00
|
|
|
import {Type, CONST_EXPR} from 'angular2/src/facade/lang';
|
2015-06-10 20:51:44 +00:00
|
|
|
import {NgControlName} from './directives/ng_control_name';
|
|
|
|
|
import {NgFormControl} from './directives/ng_form_control';
|
|
|
|
|
import {NgModel} from './directives/ng_model';
|
|
|
|
|
import {NgControlGroup} from './directives/ng_control_group';
|
|
|
|
|
import {NgFormModel} from './directives/ng_form_model';
|
|
|
|
|
import {NgForm} from './directives/ng_form';
|
2015-05-30 18:56:00 +00:00
|
|
|
import {DefaultValueAccessor} from './directives/default_value_accessor';
|
|
|
|
|
import {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';
|
2015-10-15 18:38:34 +00:00
|
|
|
import {NumberValueAccessor} from './directives/number_value_accessor';
|
2016-02-06 00:08:53 +00:00
|
|
|
import {RadioControlValueAccessor} from './directives/radio_control_value_accessor';
|
2015-09-29 18:19:06 +00:00
|
|
|
import {NgControlStatus} from './directives/ng_control_status';
|
2015-06-13 19:15:42 +00:00
|
|
|
import {
|
|
|
|
|
SelectControlValueAccessor,
|
|
|
|
|
NgSelectOption
|
|
|
|
|
} from './directives/select_control_value_accessor';
|
2015-11-20 06:36:28 +00:00
|
|
|
import {
|
|
|
|
|
RequiredValidator,
|
|
|
|
|
MinLengthValidator,
|
|
|
|
|
MaxLengthValidator,
|
|
|
|
|
PatternValidator
|
|
|
|
|
} from './directives/validators';
|
2015-05-30 18:56:00 +00:00
|
|
|
|
2015-06-10 20:51:44 +00:00
|
|
|
export {NgControlName} from './directives/ng_control_name';
|
|
|
|
|
export {NgFormControl} from './directives/ng_form_control';
|
|
|
|
|
export {NgModel} from './directives/ng_model';
|
|
|
|
|
export {NgControlGroup} from './directives/ng_control_group';
|
|
|
|
|
export {NgFormModel} from './directives/ng_form_model';
|
|
|
|
|
export {NgForm} from './directives/ng_form';
|
2015-05-30 18:56:00 +00:00
|
|
|
export {DefaultValueAccessor} from './directives/default_value_accessor';
|
|
|
|
|
export {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';
|
2016-02-06 00:08:53 +00:00
|
|
|
export {
|
|
|
|
|
RadioControlValueAccessor,
|
|
|
|
|
RadioButtonState
|
|
|
|
|
} from './directives/radio_control_value_accessor';
|
2015-10-28 14:26:58 +00:00
|
|
|
export {NumberValueAccessor} from './directives/number_value_accessor';
|
|
|
|
|
export {NgControlStatus} from './directives/ng_control_status';
|
2015-07-17 21:07:32 +00:00
|
|
|
export {
|
|
|
|
|
SelectControlValueAccessor,
|
|
|
|
|
NgSelectOption
|
|
|
|
|
} from './directives/select_control_value_accessor';
|
2015-11-20 06:36:28 +00:00
|
|
|
export {
|
|
|
|
|
RequiredValidator,
|
|
|
|
|
MinLengthValidator,
|
|
|
|
|
MaxLengthValidator,
|
|
|
|
|
PatternValidator
|
|
|
|
|
} from './directives/validators';
|
2015-10-28 14:26:58 +00:00
|
|
|
export {NgControl} from './directives/ng_control';
|
|
|
|
|
export {ControlValueAccessor} from './directives/control_value_accessor';
|
2015-02-07 22:14:07 +00:00
|
|
|
|
2015-03-31 22:47:11 +00:00
|
|
|
/**
|
2015-04-10 18:15:01 +00:00
|
|
|
*
|
2016-03-08 21:36:48 +00:00
|
|
|
* A list of all the form directives used as part of a `@Component` annotation.
|
2015-04-10 18:15:01 +00:00
|
|
|
*
|
|
|
|
|
* This is a shorthand for importing them each individually.
|
2015-09-24 22:03:16 +00:00
|
|
|
*
|
2015-10-19 14:37:32 +00:00
|
|
|
* ### Example
|
2015-09-24 22:03:16 +00:00
|
|
|
*
|
|
|
|
|
* ```typescript
|
|
|
|
|
* @Component({
|
2015-10-11 14:41:19 +00:00
|
|
|
* selector: 'my-app',
|
|
|
|
|
* directives: [FORM_DIRECTIVES]
|
2015-09-24 22:03:16 +00:00
|
|
|
* })
|
|
|
|
|
* class MyApp {}
|
|
|
|
|
* ```
|
2015-03-31 22:47:11 +00:00
|
|
|
*/
|
2015-08-28 18:29:19 +00:00
|
|
|
export const FORM_DIRECTIVES: Type[] = CONST_EXPR([
|
2015-06-10 20:51:44 +00:00
|
|
|
NgControlName,
|
|
|
|
|
NgControlGroup,
|
2015-05-30 18:56:00 +00:00
|
|
|
|
2015-06-10 20:51:44 +00:00
|
|
|
NgFormControl,
|
|
|
|
|
NgModel,
|
|
|
|
|
NgFormModel,
|
|
|
|
|
NgForm,
|
2015-05-30 18:56:00 +00:00
|
|
|
|
2015-06-13 19:15:42 +00:00
|
|
|
NgSelectOption,
|
2015-05-20 04:10:23 +00:00
|
|
|
DefaultValueAccessor,
|
2015-10-15 18:38:34 +00:00
|
|
|
NumberValueAccessor,
|
2015-05-30 18:56:00 +00:00
|
|
|
CheckboxControlValueAccessor,
|
2015-06-05 21:31:03 +00:00
|
|
|
SelectControlValueAccessor,
|
2016-02-06 00:08:53 +00:00
|
|
|
RadioControlValueAccessor,
|
2015-09-29 18:19:06 +00:00
|
|
|
NgControlStatus,
|
2015-06-05 21:31:03 +00:00
|
|
|
|
2015-10-13 21:38:13 +00:00
|
|
|
RequiredValidator,
|
|
|
|
|
MinLengthValidator,
|
2015-11-20 06:36:28 +00:00
|
|
|
MaxLengthValidator,
|
|
|
|
|
PatternValidator
|
2015-07-17 21:07:32 +00:00
|
|
|
]);
|