21 lines
560 B
TypeScript
Raw Normal View History

import {ControlValueAccessor} from './control_value_accessor';
import {Validators} from '../validators';
import {Control} from '../model';
2015-05-31 12:24:34 -07:00
/**
* A directive that bind a [ng-control] object to a DOM element.
2015-05-31 12:24:34 -07:00
*
* @exportedAs angular2/forms
*/
export class NgControl {
name: string = null;
valueAccessor: ControlValueAccessor = null;
validator: Function;
get path(): List<string> { return null; }
get control(): Control { return null; }
constructor() { this.validator = Validators.nullValidator; }
2015-05-31 12:24:34 -07:00
viewToModelUpdate(newValue: any): void {}
}