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:
vsavkin
2015-09-30 20:59:23 -07:00
parent 33593cf8a2
commit adbfd29fd7
89 changed files with 405 additions and 423 deletions

View File

@ -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,

View File

@ -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,

View File

@ -85,7 +85,7 @@ const formDirectiveBinding =
host: {
'(submit)': 'onSubmit()',
},
events: ['ngSubmit'],
outputs: ['ngSubmit'],
exportAs: 'form'
})
export class NgForm extends ControlContainer implements Form {

View File

@ -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 {

View File

@ -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,

View File

@ -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 {