feat(core): renames Property into Input and Event into Output
BREACKING CHANGE: Before: @Directive({properties: ['one'], events: ['two']}) After: @Directive({inputs: ['one'], outputs: ['two']}) Before: @Component({properties: ['one'], events: ['two']}) After: @Componet({inputs: ['one'], outputs: ['two']}) Before: class A {@Property() one; @Event() two;} After: class A {@Input() one; @Output() two;}
This commit is contained in:
@ -53,7 +53,7 @@ const controlGroupBinding =
|
||||
@Directive({
|
||||
selector: '[ng-control-group]',
|
||||
bindings: [controlGroupBinding],
|
||||
properties: ['name: ng-control-group'],
|
||||
inputs: ['name: ng-control-group'],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class NgControlGroup extends ControlContainer implements OnInit,
|
||||
|
@ -75,8 +75,8 @@ const controlNameBinding =
|
||||
@Directive({
|
||||
selector: '[ng-control]',
|
||||
bindings: [controlNameBinding],
|
||||
properties: ['name: ngControl', 'model: ngModel'],
|
||||
events: ['update: ngModel'],
|
||||
inputs: ['name: ngControl', 'model: ngModel'],
|
||||
outputs: ['update: ngModel'],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class NgControlName extends NgControl implements OnChanges,
|
||||
|
@ -85,7 +85,7 @@ const formDirectiveBinding =
|
||||
host: {
|
||||
'(submit)': 'onSubmit()',
|
||||
},
|
||||
events: ['ngSubmit'],
|
||||
outputs: ['ngSubmit'],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class NgForm extends ControlContainer implements Form {
|
||||
|
@ -65,8 +65,8 @@ const formControlBinding =
|
||||
@Directive({
|
||||
selector: '[ng-form-control]',
|
||||
bindings: [formControlBinding],
|
||||
properties: ['form: ngFormControl', 'model: ngModel'],
|
||||
events: ['update: ngModel'],
|
||||
inputs: ['form: ngFormControl', 'model: ngModel'],
|
||||
outputs: ['update: ngModel'],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class NgFormControl extends NgControl implements OnChanges {
|
||||
|
@ -92,9 +92,9 @@ const formDirectiveBinding =
|
||||
@Directive({
|
||||
selector: '[ng-form-model]',
|
||||
bindings: [formDirectiveBinding],
|
||||
properties: ['form: ng-form-model'],
|
||||
inputs: ['form: ng-form-model'],
|
||||
host: {'(submit)': 'onSubmit()'},
|
||||
events: ['ngSubmit'],
|
||||
outputs: ['ngSubmit'],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class NgFormModel extends ControlContainer implements Form,
|
||||
|
@ -36,8 +36,8 @@ const formControlBinding = CONST_EXPR(new Binding(NgControl, {toAlias: forwardRe
|
||||
@Directive({
|
||||
selector: '[ng-model]:not([ng-control]):not([ng-form-control])',
|
||||
bindings: [formControlBinding],
|
||||
properties: ['model: ngModel'],
|
||||
events: ['update: ngModel'],
|
||||
inputs: ['model: ngModel'],
|
||||
outputs: ['update: ngModel'],
|
||||
exportAs: 'form'
|
||||
})
|
||||
export class NgModel extends NgControl implements OnChanges {
|
||||
|
Reference in New Issue
Block a user