title: File Transfer Plugin ionic 2
body: <p>I am trying to download a song when i click a button.</p>
  
  <p>here is my .ts file.</p>
  
  <pre><code>download() {
      this.platform.ready().then(()=&gt;{
      const fileTransfer = new Transfer();
      let url = 'http://think-digital.in/wp-content/uploads/2017/03/varla-varla-vaa.mp3';
      fileTransfer.download(url, cordova.file.dataDirectory + 'file.mp3').then((entry) =&gt; {
        console.log('download complete: ' + entry);
        console.log('download complete: ' + entry.toURL());
      }, (error) =&gt; {
        // handle error
        console.log(error);
      });
    });
    }
  </code></pre>
  
  <p>i am getting error like this</p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'file' of undefined</p>
  </blockquote>
  
  <p>what mistake i am doing </p>