fix(inputs): fix form onChange/onTouch

This commit is contained in:
Adam Bradley
2016-01-07 09:22:17 -06:00
parent f74606dc1b
commit 2070e58e3e
3 changed files with 59 additions and 17 deletions

View File

@ -55,9 +55,6 @@ export class Checkbox {
) {
_form.register(this);
this.onChange = (_) => {};
this.onTouched = (_) => {};
if (ngControl) {
ngControl.valueAccessor = this;
}
@ -114,6 +111,20 @@ export class Checkbox {
this.checked = value;
}
/**
* @private
*/
onChange(val) {
// TODO: figure the whys and the becauses
}
/**
* @private
*/
onTouched(val) {
// TODO: figure the whys and the becauses
}
/**
* @private
* Angular2 Forms API method called by the view (NgControl) to register the