Skip to main content
added 1 character in body
Source Link
Rick
  • 13.6k
  • 3
  • 46
  • 42

If you just want to covertconvert a string to be available for download you can try this using jQuery.

$('a.download').attr('href', 'data:application/csv;charset=utf-8,' + encodeURI(data)); 

If you just want to covert a string to be available for download you can try this using jQuery.

$('a.download').attr('href', 'data:application/csv;charset=utf-8,' + encodeURI(data)); 

If you just want to convert a string to be available for download you can try this using jQuery.

$('a.download').attr('href', 'data:application/csv;charset=utf-8,' + encodeURI(data)); 
Added in requested change.
Source Link
Rick
  • 13.6k
  • 3
  • 46
  • 42

If you just want to covert a string to be available for download you can try something like this in angularjs using jqueryjQuery.

$('a.download').attr('href', 'data:application/csv;charset=utf-8,'+$scope.' + encodeURI(data)); 

If you just want to covert a string to be available for download you can try something like this in angularjs using jquery.

$('a.download').attr('href', 'data:application/csv;charset=utf-8,'+$scope.data); 

If you just want to covert a string to be available for download you can try this using jQuery.

$('a.download').attr('href', 'data:application/csv;charset=utf-8,' + encodeURI(data)); 
Source Link
Rick
  • 13.6k
  • 3
  • 46
  • 42

If you just want to covert a string to be available for download you can try something like this in angularjs using jquery.

$('a.download').attr('href', 'data:application/csv;charset=utf-8,'+$scope.data);