title: Angular2 and RXJS, unsubscribe after data received once
body: <p>I have a subscribe call that needs to only receive data once. 
  The Angular 2 page that its on is long running.</p>
  
  <p>I want to ensure that the subscription doesn't cause any problems regarding memory leaks and unsubscribes once data is received the first time. </p>
  
  <p>This is my service that makes an api query. It uses .first so it should cleanup once data is received once.</p>
  
  <pre><code>getData(): Observable&lt;string&gt; {
      let _url = SOME_API_URL;
      return this._http.get(_url).first().map((response: Response) =&gt; { return response.json(); });
  }
  </code></pre>
  
  <p>This is my Ng2 subscription. Do I need to do anything in this is ensure that everything is cleaned up after the first() data is received?</p>
  
  <pre><code>this._service.getData().subscribe((data: any) =&gt; {
      // Do something once.
      // DO I HAVE TO UNSUBSCRIBE OR WILL THE CLEANUP HAPPEN DUE TO THE ABOVE FIRST() CALL?
  });
  </code></pre>
  
  <p>I could use ngDestory but that wouldn't be called as the page is long running and is not often refreshed.</p>