- npm > 3.x.x
git clone https://github.com/pratikq23/angularjs-exportcsv
cd angularjs-exportcsv
npm install
npm run
-
- Copy app/directive/exportToCsv.js to your directives folder
-
- Add this to your module
angular.module('myApp', [
'tableCSV',
]).
-
- Include this to your index.html or import the directive, whatever is your project architecture:
<script src='directive/exportToCsv.js'></script>
-
- Add this to a button tag:
<button export-to-csv>Generate Report</button>
Enjoy the export file functionality