feat(forms): set exportAs to form for all form related directives
This commit is contained in:
parent
73bce40287
commit
e7e82cbee6
|
@ -58,7 +58,8 @@ const controlGroupBinding = CONST_EXPR(
|
|||
selector: '[ng-control-group]',
|
||||
hostInjector: [controlGroupBinding],
|
||||
properties: ['name: ng-control-group'],
|
||||
lifecycle: [onInit, onDestroy]
|
||||
lifecycle: [onInit, onDestroy],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class ControlGroupDirective extends ControlContainerDirective {
|
||||
_parent: ControlContainerDirective;
|
||||
|
|
|
@ -60,7 +60,8 @@ const controlNameBinding =
|
|||
hostInjector: [controlNameBinding],
|
||||
properties: ['name: ng-control', 'model: ng-model'],
|
||||
events: ['ngModel'],
|
||||
lifecycle: [onDestroy, onChange]
|
||||
lifecycle: [onDestroy, onChange],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class ControlNameDirective extends ControlDirective {
|
||||
_parent: ControlContainerDirective;
|
||||
|
|
|
@ -49,7 +49,8 @@ const formControlBinding =
|
|||
hostInjector: [formControlBinding],
|
||||
properties: ['form: ng-form-control', 'model: ng-model'],
|
||||
events: ['ngModel'],
|
||||
lifecycle: [onChange]
|
||||
lifecycle: [onChange],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class FormControlDirective extends ControlDirective {
|
||||
form: Control;
|
||||
|
|
|
@ -63,7 +63,8 @@ const formDirectiveBinding = CONST_EXPR(
|
|||
hostListeners: {
|
||||
'submit': 'onSubmit()',
|
||||
},
|
||||
events: ['ngSubmit']
|
||||
events: ['ngSubmit'],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class FormModelDirective extends ControlContainerDirective implements FormDirective {
|
||||
form: ControlGroup = null;
|
||||
|
|
|
@ -17,7 +17,8 @@ const formControlBinding =
|
|||
hostInjector: [formControlBinding],
|
||||
properties: ['model: ng-model'],
|
||||
events: ['ngModel'],
|
||||
lifecycle: [onChange]
|
||||
lifecycle: [onChange],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class NgModelDirective extends ControlDirective {
|
||||
control: Control;
|
||||
|
|
|
@ -19,7 +19,8 @@ const formDirectiveBinding = CONST_EXPR(new Binding(
|
|||
hostListeners: {
|
||||
'submit': 'onSubmit()',
|
||||
},
|
||||
events: ['ngSubmit']
|
||||
events: ['ngSubmit'],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class TemplateDrivenFormDirective extends ControlContainerDirective implements
|
||||
FormDirective {
|
||||
|
|
Loading…
Reference in New Issue