Dart Documentationangular.directiveInputCheckboxDirective

InputCheckboxDirective class

The UI portion of the ng-model directive. This directive registers the UI events and provides a rendering function for the ng-model directive.

@NgDirective(selector: 'input[type=checkbox][ng-model]')
class InputCheckboxDirective {
 dom.InputElement inputElement;
 NgModel ngModel;
 Scope scope;

 InputCheckboxDirective(dom.Element this.inputElement, NgModel this.ngModel, Scope this.scope) {
   ngModel.render = (value) {
     inputElement.checked = value == null ? false : toBool(value);
   };
   inputElement.onChange.listen((value) {
     scope.$apply(() => ngModel.viewValue = inputElement.checked);
   });
 }
}

Constructors

new InputCheckboxDirective(Element inputElement, NgModel ngModel, Scope scope) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
InputCheckboxDirective(dom.Element this.inputElement, NgModel this.ngModel, Scope this.scope) {
 ngModel.render = (value) {
   inputElement.checked = value == null ? false : toBool(value);
 };
 inputElement.onChange.listen((value) {
   scope.$apply(() => ngModel.viewValue = inputElement.checked);
 });
}

Properties

InputElement inputElement #

dom.InputElement inputElement

NgModel ngModel #

NgModel ngModel

Scope scope #

Scope scope