title: Angular2 : Can't bind to 'formGroup' since it isn't a known property of 'form'
body: <p>I'm new in angular 2 and i try to make a reactive form but i have some trouble. After many search in stack i found no solutions.</p>
  <p>Here you can see my error</p>
  <p><a href="https://i.stack.imgur.com/59xkk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/59xkk.png" alt="enter image description here" /></a></p>
  <p>The code :</p>
  <p>View :</p>
  <pre class="lang-html prettyprint-override"><code>    &lt;main&gt;
          &lt;div class=&quot;container&quot;&gt;
              &lt;h2&gt;User data&lt;/h2&gt;
              &lt;form [formGroup]=&quot;userForm&quot;&gt;
                  &lt;div class=&quot;form-group&quot;&gt;
                      &lt;label&gt;name&lt;/label&gt;
                      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; formControlName=&quot;name&quot;&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;form-group&quot;&gt;
                      &lt;label&gt;email&lt;/label&gt;
                      &lt;input type=&quot;text&quot; class=&quot;form-control&quot; formControlName=&quot;email&quot;&gt;
                  &lt;/div&gt;
                  &lt;div class=&quot;&quot; formGroupName=&quot;adresse&quot;&gt;
                      &lt;div class=&quot;form-group&quot;&gt;
                          &lt;label&gt;Rue&lt;/label&gt;
                          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; formControlName=&quot;rue&quot;&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group&quot;&gt;
                          &lt;label&gt;Ville&lt;/label&gt;
                          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; formControlName=&quot;ville&quot;&gt;
                      &lt;/div&gt;
                      &lt;div class=&quot;form-group&quot;&gt;
                          &lt;label&gt;Cp&lt;/label&gt;
                          &lt;input type=&quot;text&quot; class=&quot;form-control&quot; formControlName=&quot;cp&quot;&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;Submit&lt;/button&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/main&gt;
  </code></pre>
  <p>My module.ts</p>
  <pre class="lang-js prettyprint-override"><code>    import { NgModule }      from '@angular/core';
      import { CommonModule }  from '@angular/common';
      import { BrowserModule } from '@angular/platform-browser';
      import { ContactComponent } from './contact.component';
      import { FormGroup , FormControl , ReactiveFormsModule , FormsModule } from '@angular/forms';
      
      
      @NgModule({
        imports: [
          NgModule,
          BrowserModule,
          FormsModule,
          ReactiveFormsModule,
          FormGroup,
          FormControl
        ],
        declarations: [
          ContactComponent
        ]
      })
      export class ContactModule {}
  
  
  
  And my component.ts
  
      import {Component} from '@angular/core';
      import { FormGroup , FormControl } from '@angular/forms';
      
      @Component({
        selector: 'contact',
        templateUrl: './contact.component.html'
        // styleUrls: ['../../app.component.css']
      })
      export class ContactComponent {
      
          userForm = new FormGroup({
              name: new FormControl(),
              email: new FormControl(),
              adresse: new FormGroup({
                  rue: new FormControl(),
                  ville: new FormControl(),
                  cp: new FormControl(),
              })
          });
      }
  </code></pre>
  <p>I don't understand my error because import of ReactiveForm is here. So ... i need your help :) Thanks</p>
  <p>After I read your answer and refactoring my code, it's ok, that works! The problem was i import reactive module in the module of my page contact and i need import this in module of my app. So thanks a lot for your interest :)</p>
  <p>Hope this answer help another people guys.</p>