title: How to download file to Download's directory with Ionic Framework?
body: <p>I'm trying with <code>ngCordova</code> but the <code>cordova.file.documentsDirectory</code> property is <code>null</code>.</p>
  
  <p>I have also tried combining the use of <code>ngCordova</code> with <code>requestFileSystem</code>, but still, the file is not saved in the "Download's".</p>
  
  <p>Example of my code:</p>
  
  <pre><code>window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(directory) {
      var fileTransfer = new FileTransfer();
      fileTransfer.download(
          encodeURI("http://example.com/sample.pdf"),
          directory.root.nativeURL + 'sample.pdf',
          function(entry) {
              console.log("download complete: " + entry.fullPath);
          },
          function(error) {
              console.log("download error source " + error.source);
              console.log("download error target " + error.target);
              console.log("upload error code" + error.code);
          },
          false
      );
  }, function(err){console.error(err)});
  </code></pre>
  
  <p>Thanks.</p>