title: Angular forms with observable
body: <p>I got Error : Invalid event target on my script i did that before with @ViewChild without any issue but when i try to use FormGroup i got error!!</p>
  
  <pre><code>import { Component , OnInit } from '@angular/core';
  import {FormGroup,FormBuilder} from '@angular/forms';
  import {Observable} from 'rxjs/Rx';
  
  @Component({
  selector: 'app-root',
  template: `&lt;h1&gt;Hello World!&lt;/h1&gt;
              &lt;form [formGroup]="frm1"&gt;
              &lt;input type="text" formControlName="name" &gt;
              &lt;input type="text" formControlName="family" #family&gt;
              &lt;/form&gt;
              `,
  
  })
  
  export class AppComponent implements OnInit{ 
  
   frm1 : FormGroup;
  
  constructor( fb:FormBuilder){
      this.frm1 = fb.group({
          name : [],
          family: []
      });     
  }
  ngOnInit(){ 
      var keyup =  Observable.fromEvent(this.frm1.get('family').value , "keyup")
                .map((data:string) =&gt; data.replace(' ','-'))
                .debounceTime(400);               
      keyup.subscribe(x =&gt; console.log(x));
  }
  }
  </code></pre>