feat(forms): Use the DefaultValueAccessor for controls with an ng-default-control attribute.

Third party controls require a ControlValueAccessor to function with Angular Forms. Many of them, like Polymer's <paper-input>, behave like the <input> native element and thus can use the DefaultValueAccessor. Adding an ng-default-control attribute will now allow them to use that directive.

Closes #5076
This commit is contained in:
Alex Rickabaugh 2015-11-02 11:37:04 -08:00
parent fee5dea826
commit f21e78244f
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ const DEFAULT_VALUE_ACCESSOR = CONST_EXPR(new Provider(
*/
@Directive({
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]',
'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],[ng-default-control]',
// 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]',