title: Angular: Property 'then' does not exist on type 'Observable'
body: <p>I am using Nativescript here to build a mobile App. There is an error here. In my ASP.Net MVC 5 development using Visual Studio 2017, it is fine using <code>$http.get().then()</code>, but in Nativescript it does not.</p>
  
  <p>Please see the code bellow:</p>
  
  <pre><code>import { Component, OnInit } from "@angular/core";
  import { HttpClient } from '@angular/common/http';
  
  @Component({
      selector: "Home",
      moduleId: module.id,
      templateUrl: "./home.component.html",
      styleUrls: ["./home.component.css"]
  })
  export class HomeComponent implements OnInit {
  
      constructor(private http: HttpClient) {
      }
  
      ngOnInit(): void {
          this.http.get('https://somewebsite.com',
              {
                  params: { 'sorter': '', 'isAscending': 'true', 'searchString': '', 'currentPage': '1', 'itemsPerPage': '300' },
                  headers: {
                      "Authorization": "Basic encryptedcodehere"
                  }
              }).then(function (response) {
                  var theData = JSON.parse(response.data);
                  if (theData.Data != null &amp;&amp; theData.Data.length &gt; 0) {
                      log(theData.Data);
                  }
              });
      }
  }
  </code></pre>
  
  <p>The error is: <code>Property 'then' does not exist on type 'Observable'.</code>?</p>
  
  <p>What is happening here?</p>