title: Where to subscribe to an observable, constructor or ngoninit in Angular
body: <p>I know this is posted all over SO and the internet but I'm reading so many different things, I'm just a little confused now.</p>
  <p><strong>2 QUESTIONS</strong> -</p>
  <ol>
  <li>Where is the best place to subscribe to my component, the constructor(), or in NgOnInit()?</li>
  <li>Should I use a pipe when subscribing to an Observable so that Angular can destroy it or so I don't have to use ngondestroy? A little confused as to why there are pipes after subscribing?</li>
  </ol>
  <p>Here is an example of one of my services where, in my navbar component, I subscribe to listening to a window size change coming from a service.</p>
  <p>In my constructor, I have this -</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>this.responsiveService.getMobileStatus()
    .subscribe(mobileStatus =&gt; {
      this.isMobile = mobileStatus.status;
      if (mobileStatus.width &lt; 568) {
        this.inputPlaceholder = this.placeholderWithSearch;
      } else {
        this.inputPlaceholder = this.placeholderWithoutSearch;
      }
    });</code></pre>
  </div>
  </div>
  </p>