title: Show download progress bar ionic
body: <p>I am developing an ionic app. I am using cordova's FileTransfer plugin to download pdf file. I am able to download the  file to my internal memory,but not able to display single progress bar for downloaidng.
  What is the best way of displaying progress for downloading.</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>var url = 'http://someurl.com/api/pdf_download/' + id;
  // Android
  var targetPath = 'file:///storage/sdcard0/' + id + '.pdf';
  var trustHosts = true;
  var options = {};
  $cordovaFileTransfer.download(url, targetPath, options, trustHosts)
      .then(function(result) {
          console.log(result);
      }, function() {
          var alertPopup = $ionicPopup.alert({
              title: 'No internet access',
              buttons: [{
                  text: 'OK',
                  type: 'button-assertive'
              }]
          });
          alertPopup.then(function() {});
  
      }, function(progress) {
          $timeout(function() {
              $scope.downloadProgress = (progress.loaded / progress.total) * 100;
          })
          console.log('progress---&gt;', $scope.downloadProgress);
      });
  </code></pre>