title: How to observe mousemoves with angular2 and angular rxjs
body: <p>I have the following:</p>
  
  <h2>angular2 (NameCmp)</h2>
  
  <pre><code>import {
      OnInit, Component, ChangeDetectionStrategy, ViewChild, ElementRef,
      AfterViewInit
  } from 'angular2/core'
  import {Observable} from 'rxjs/Observable';
  
  ..
  export class NameCmp implements AfterViewInit{
  ....
    @ViewChild('card')
    card: ElementRef;
    mouseMoves$: Observable&lt;MouseEvent&gt;;
  
    ngAfterViewInit(): void {
    this.mouseMoves$ = Observable.fromEvent(this.card.nativeElement, 'mousemove');
  
      this.mouseMoves$.subscribe( event =&gt; console.log('logging mousemove'));
  
    console.log('after view init')
  }
  </code></pre>
  
  <h2>.html</h2>
  
  <pre><code>...
  &lt;md-card #card&gt;
    &lt;md-card-content&gt;
      &lt;md-input
          required
          placeholder = "Title"
          [ngFormControl] = "titleCtrl"&gt;&lt;/md-input&gt;
    &lt;/md-card-content&gt;
  &lt;/md-card&gt;
  </code></pre>
  
  <p>However, although the <code>console.log('after view init')</code> prints to the console, the <code>console.log('logging mousemove'));</code> statement does not.</p>
  
  <p>Thanks</p>