X Tutup
Skip to content

Commit f21e782

Browse files
committed
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
1 parent fee5dea commit f21e782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/angular2/src/core/forms/directives/default_value_accessor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const DEFAULT_VALUE_ACCESSOR = CONST_EXPR(new Provider(
2020
*/
2121
@Directive({
2222
selector:
23-
'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]',
23+
'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]',
2424
// TODO: vsavkin replace the above selector with the one below it once
2525
// https://github.com/angular/angular/issues/3011 is implemented
2626
// selector: '[ng-control],[ng-model],[ng-form-control]',

0 commit comments

Comments
 (0)
X Tutup