refactor(forms): remove useless imports
Remove useless imports and change `bindings` to `providers` inside `@Component` and `@Directive`. Closes #7904
This commit is contained in:
parent
33c7f74cb9
commit
165357bfa3
|
@ -25,7 +25,7 @@ export const DEFAULT_VALUE_ACCESSOR: any = /*@ts2dart_const*/
|
|||
// https://github.com/angular/angular/issues/3011 is implemented
|
||||
// selector: '[ngControl],[ngModel],[ngFormControl]',
|
||||
host: {'(input)': 'onChange($event.target.value)', '(blur)': 'onTouched()'},
|
||||
bindings: [DEFAULT_VALUE_ACCESSOR]
|
||||
providers: [DEFAULT_VALUE_ACCESSOR]
|
||||
})
|
||||
export class DefaultValueAccessor implements ControlValueAccessor {
|
||||
onChange = (_: any) => {};
|
||||
|
|
|
@ -90,7 +90,7 @@ export const controlNameBinding: any =
|
|||
*/
|
||||
@Directive({
|
||||
selector: '[ngControl]',
|
||||
bindings: [controlNameBinding],
|
||||
providers: [controlNameBinding],
|
||||
inputs: ['name: ngControl', 'model: ngModel'],
|
||||
outputs: ['update: ngModelChange'],
|
||||
exportAs: 'ngForm'
|
||||
|
|
|
@ -78,7 +78,7 @@ export const formDirectiveProvider: any =
|
|||
*/
|
||||
@Directive({
|
||||
selector: 'form:not([ngNoForm]):not([ngFormModel]),ngForm,[ngForm]',
|
||||
bindings: [formDirectiveProvider],
|
||||
providers: [formDirectiveProvider],
|
||||
host: {
|
||||
'(submit)': 'onSubmit()',
|
||||
},
|
||||
|
|
|
@ -79,7 +79,7 @@ export const formControlBinding: any =
|
|||
*/
|
||||
@Directive({
|
||||
selector: '[ngFormControl]',
|
||||
bindings: [formControlBinding],
|
||||
providers: [formControlBinding],
|
||||
inputs: ['form: ngFormControl', 'model: ngModel'],
|
||||
outputs: ['update: ngModelChange'],
|
||||
exportAs: 'ngForm'
|
||||
|
|
|
@ -99,7 +99,7 @@ export const formDirectiveProvider: any =
|
|||
*/
|
||||
@Directive({
|
||||
selector: '[ngFormModel]',
|
||||
bindings: [formDirectiveProvider],
|
||||
providers: [formDirectiveProvider],
|
||||
inputs: ['form: ngFormModel'],
|
||||
host: {'(submit)': 'onSubmit()'},
|
||||
outputs: ['ngSubmit'],
|
||||
|
|
|
@ -50,7 +50,7 @@ export const formControlBinding: any =
|
|||
*/
|
||||
@Directive({
|
||||
selector: '[ngModel]:not([ngControl]):not([ngFormControl])',
|
||||
bindings: [formControlBinding],
|
||||
providers: [formControlBinding],
|
||||
inputs: ['model: ngModel'],
|
||||
outputs: ['update: ngModelChange'],
|
||||
exportAs: 'ngForm'
|
||||
|
|
|
@ -25,7 +25,7 @@ export const NUMBER_VALUE_ACCESSOR: any = /*@ts2dart_const*/ /*@ts2dart_Provider
|
|||
'(input)': 'onChange($event.target.value)',
|
||||
'(blur)': 'onTouched()'
|
||||
},
|
||||
bindings: [NUMBER_VALUE_ACCESSOR]
|
||||
providers: [NUMBER_VALUE_ACCESSOR]
|
||||
})
|
||||
export class NumberValueAccessor implements ControlValueAccessor {
|
||||
onChange = (_: any) => {};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import {OpaqueToken} from '@angular/core';
|
||||
|
||||
import {isBlank, isPresent, isString} from '../../src/facade/lang';
|
||||
import {PromiseWrapper} from '../../src/facade/promise';
|
||||
import {ObservableWrapper} from '../../src/facade/async';
|
||||
|
|
Loading…
Reference in New Issue