
p.location-badge.
  exported from <a href='../core'>angular2/core</a>
  defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/forms/directives/ng_form_control.ts#L12-L91">angular2/src/core/forms/directives/ng_form_control.ts (line 12)</a>

:markdown
  Binds an existing control to a DOM element.
  
  # Example
  
  In this example, we bind the control to an input element. When the value of the input element
  changes, the value of the control will reflect that change. Likewise, if the value of the
  control changes, the input element reflects that change.
  
   ```
  @Component({selector: "login-comp"})
  @View({
       directives: [FORM_DIRECTIVES],
       template: "<input type='text' [ng-form-control]='loginControl'>"
       })
  class LoginComp {
   loginControl: Control = new Control('');;
  }
  
   ```
  
  We can also use `ng-model` to bind a domain model to the form.
  
   ```
  @Component({selector: "login-comp"})
  @View({
       directives: [FORM_DIRECTIVES],
       template: "<input type='text' [ng-form-control]='loginControl' [(ng-model)]='login'>"
       })
  class LoginComp {
   loginControl: Control = new Control('');
   login:string;
  }
   ```
  
  

.l-main-section
  h2 Annotations
  .l-sub-section
    h3.annotation Directive
    pre.prettyprint
      code.
        @Directive({
          selector: &#39;[ng-form-control]&#39;,
          bindings: [formControlBinding],
          properties: [&#39;form: ngFormControl&#39;, &#39;model: ngModel&#39;],
          events: [&#39;update: ngModel&#39;],
          exportAs: &#39;form&#39;
        })


.l-main-section
  h2 Members
  .l-sub-section
    h3#constructor constructor

    
    pre.prettyprint
      code.
        constructor(validators: Function[])
    
    :markdown




  .l-sub-section
    h3#form form

    
    :markdown





  .l-sub-section
    h3#update update

    
    :markdown





  .l-sub-section
    h3#model model

    
    :markdown





  .l-sub-section
    h3#viewModel viewModel

    
    :markdown





  .l-sub-section
    h3#validators validators

    
    :markdown





  .l-sub-section
    h3#onChanges onChanges

    
    pre.prettyprint
      code.
        onChanges(changes: StringMap&lt;string, any&gt;)
    
    :markdown





  .l-sub-section
    h3#path path

    
    :markdown





  .l-sub-section
    h3#control control

    
    :markdown





  .l-sub-section
    h3#validator validator

    
    :markdown





  .l-sub-section
    h3#viewToModelUpdate viewToModelUpdate

    
    pre.prettyprint
      code.
        viewToModelUpdate(newValue: any)
    
    :markdown




