title: How to target an HTML element using rxjs fromEvent in Angular 6
body: <p><strong>Issue</strong></p>
  
  <p>I have used ngrx fromEvent operator to create an Observable from 2 input text fields, I have used document as target which is fine, but now I want to target only one input field. I am not sure sure what to use instead of document to target only one input field.</p>
  
  <p><strong>What I have done so far to get the target</strong></p>
  
  <ul>
  <li>Used document.getElementByID('someID')</li>
  <li>Used ElementRef</li>
  <li>Used document.querySelector('someID')</li>
  </ul>
  
  <p><strong>Code</strong></p>
  
  <p><a href="https://stackblitz.com/edit/ngrx-fromevent" rel="noreferrer">StackBlits live editor</a> </p>
  
  <pre><code>import { Component } from '@angular/core';
  import { fromEvent } from 'rxjs';
  
  @Component({
    selector: 'my-app',
    template: `&lt;input type="text"&gt;
               &lt;input type="text"&gt;`
  })
  export class AppComponent {
    ngOnInit() {
      fromEvent(document, 'keyup')
        .subscribe(res =&gt; console.log(res.target.value));
    }
  }
  </code></pre>
  
  <p>Thanks for your help in advance.</p>