title: property subscribe does not exist on type 'void'
body: <p>I am having an constant error that tends to pop up in my code (using Visual Studio Code as my IDE):</p>
  
  <blockquote>
    <p>Property subscribe does not exist on type 'void'.....</p>
  </blockquote>
  
  <p>When I run the code, I get an error message in Ionic localhost.</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { NewsService } from '../news.service';
  
  @Component({
    selector: 'app-news',
    templateUrl: './news.page.html',
    styleUrls: ['./news.page.scss'],
  })
  export class NewsPage implements OnInit {
  
    constructor(private newsService: NewsService) { }
  
    ngOnInit() {
      this.newsService.getData('everything?q=bitcoin&amp;from=2018-10-09&amp;sortBy=publishedAt')
      .subscribe(data =&gt; {
        console.log(data);
      });
    }
  }
  </code></pre>