title: Ionic 2 - (window as any).resolveLocalFileSystemURL() throwing error
body: <p>I have some typescript code that uses the camera:</p>
  
  <pre><code>this.camera.getPicture(this.optionsGetCamera).then((imageURI) =&gt; {
      if (this.platform.is('ios')) {
          this.crop.crop(imageURI, { quality: 100 }).then(newPath =&gt; {
              console.log(newPath);
              (window as any).resolveLocalFileSystemURL(newPath, function (fileEntry) {
                   this.readFile(fileEntry);
              });
          }).catch((error) =&gt; { ...
  </code></pre>
  
  <p>When I run the app, and use the camera function that gets used in this code, I get an error in the console (I am running on a device using the -lc parameter to view the log):</p>
  
  <p><code>console.error: ERROR -&gt; 
              {"line":58535,"column":81,"sourceURL":"http://192.168.1.131:8100/build/main.js","__zone_symbol__currentTask":{"type":"microTask","state":"notScheduled","source":"Promise.then","zone":"angular","cancelFn":null,"runCount":0}}</code></p>
  
  <p><code>line 58535</code> is this:</p>
  
  <p><code>window.resolveLocalFileSystemURL(newPath, function (fileEntry) {</code></p>
  
  <p>This line is in the main.js file that gets created by ionic on build. I have been trying to understand <code>"source":"Promise.then"</code> as it seems like it might point to the problem (with a promise? or not using one?). Thanks.</p>