title: NativeScript usage of the new HttpClient - causes error?
body: <p>Currently I have a working app (Groceries app):</p>
  
  <p><a href="http://jsbin.com/femofufeta/edit?html" rel="nofollow noreferrer"><em>Using this app.module.ts file</em></a></p>
  
  <p>Where <a href="http://jsbin.com/norujoxenu/edit?html" rel="nofollow noreferrer">this is how I use the (old) <code>Http</code>  module</a> : </p>
  
  <p>(Although it's working) - Webstorm doesn't recognize it ( since <code>Http</code> is old): </p>
  
  <p><img src="https://user-images.githubusercontent.com/2842123/32726306-2fa425b0-c881-11e7-8dfa-1a797c937b17.png" alt="image"></p>
  
  <p>So  I've changed <code>app.module.ts</code> to use the new <code>HttpClient</code> : </p>
  
  <p>via : </p>
  
  <pre><code>import {HttpClient, HttpHeaders} from "@angular/common/http";
  </code></pre>
  
  <p><img src="https://user-images.githubusercontent.com/2842123/32726427-ac69c7a8-c881-11e7-9c82-00d8aaaf57b8.png" alt="image"></p>
  
  <p>Then I get this exception : </p>
  
  <pre><code>System.err: Caused by: com.tns.NativeScriptException: 
  System.err: Calling js method onActivityResumed failed
  System.err: 
  System.err: **Error: Trying to link invalid 'this' to a Java object**
  System.err: File: "file:///data/data/org.nativescript.Groceries/files/app/tns_modules/tns-core-modules/ui/frame/fragment.transitions.js, line: 266, column: 35
  System.err: 
  System.err: StackTrace: 
  </code></pre>
  
  <p>Full error (in console) is <a href="http://jsbin.com/gecagaduwe/edit?html" rel="nofollow noreferrer"><strong>here</strong></a> : </p>
  
  <p><strong>Question</strong></p>
  
  <p>How can I fix my code  not to show this error  ? </p>
  
  <p><a href="http://jsbin.com/sifinuyibu/edit?html,output" rel="nofollow noreferrer">Here is the package.json file</a></p>