
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_model.ts#L13-L73">angular2/src/core/forms/directives/ng_model.ts (line 13)</a>

:markdown
  Binds a domain model to the form.
  
  # Example
   ```
  @Component({selector: "search-comp"})
  @View({
       directives: [FORM_DIRECTIVES],
       template: `<input type='text' [(ng-model)]="searchQuery">`
       })
  class SearchComp {
   searchQuery: string;
  }
   ```
  
  

.l-main-section
  h2 Annotations
  .l-sub-section
    h3.annotation Directive
    pre.prettyprint
      code.
        @Directive({
          selector: &#39;[ng-model]:not([ng-control]):not([ng-form-control])&#39;,
          bindings: [formControlBinding],
          properties: [&#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#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#control control

    
    :markdown





  .l-sub-section
    h3#path path

    
    :markdown





  .l-sub-section
    h3#validator validator

    
    :markdown





  .l-sub-section
    h3#viewToModelUpdate viewToModelUpdate

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




