fix(default_value_accessor): support custom input elements that fire custom change events.

Closes #4878
This commit is contained in:
Tobias Bosch
2015-10-23 14:06:46 -07:00
parent de6774cd97
commit 56a9b020d4
2 changed files with 49 additions and 3 deletions
@@ -19,7 +19,11 @@ const DEFAULT_VALUE_ACCESSOR = CONST_EXPR(new Provider(
* ```
*/
@Directive({
selector: '[ng-control],[ng-model],[ng-form-control]',
selector:
'input:not([type=checkbox])[ng-control],textarea[ng-control],input:not([type=checkbox])[ng-form-control],textarea[ng-form-control],input:not([type=checkbox])[ng-model],textarea[ng-model]',
// TODO: vsavkin replace the above selector with the one below it once
// https://github.com/angular/angular/issues/3011 is implemented
// selector: '[ng-control],[ng-model],[ng-form-control]',
host: {
'(change)': 'onChange($event.target.value)',
'(input)': 'onChange($event.target.value)',