Implementing AngularJS file saver to download large text content
<p>I wanted to implement filesaver where I wanted to download very large data of text . I saw there are some libraries already available such as </p>

<p><strong><em><a href="https://github.com/alferov/angular-file-saver" rel="nofollow noreferrer">Angular JS File Saver</a></em></strong></p>

<pre><code>&lt;div class="wrapper" ng-controller="ExampleCtrl as vm"&gt;
  &lt;textarea
    ng-model="vm.val.text"
    name="textarea" rows="5" cols="20"&gt;
      Hey ho let's go!
  &lt;/textarea&gt;
  &lt;a href="" class="btn btn-dark btn-small" ng-click="vm.download(vm.val.text)"&gt;
    Download
  &lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>But I am not able to under stand , How I should implement in my AngularJS app. Below is the demo of My App</p>

<p>Here I am using data.json file to put the data in the UI. And I wanted to keep a download button where user clicks that buttong users should be able to download the content present in the data.json</p>

<p><strong><a href="https://plnkr.co/edit/4xN5Z72ZqQRE2Gyt6R8E?p=preview" rel="nofollow noreferrer">Demo</a></strong></p>