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