alferov/angular-file-saver

new Blob not working in Safari.

vijaypatoliya opened this issue · 2 comments

I have used new Blob to save file in angular.
var textData='test';
var data = new Blob([textData], { type: 'application/xhtml+xml;charset=utf-8' });.

I get below error.

[object BlobConstructor]' is not a constructor (evaluating 'new Blob([creativeHtml], { type: 'application/xhtml+xml;charset=utf-8' })')

inject "Blob.js"

make sure you use angular-file-saver.bundle.js to include the extra libraries and polyfills and then as Wug said, inject Blob in your controller