Code licensed under New BSD License.
bower install ng-table-export
- Add possibility to specify encoding of the generated csv file. For example:
<a class="btn btn-primary" ng-mousedown="csv.generate($event)" ng-href="{{ csv.link() }}" download="test.csv">Export to CSV</a>
<table ng-href ... ng-export="csv" ng-export-encoding="latin1">
Alternatively (it's just a matter of taste):
<a class="btn btn-primary" ng-mousedown="csv.generate($event, 'latin1')" ng-href="{{ csv.link() }}" download="test.csv">Export to CSV</a>
<table ng-href ... ng-export="csv">
If you omit ng-export-encoding
, you will get the default (UTF-8
). Right now, only UTF-8 and latin1 (i.e. ISO-8859-1 is supported).