Check out my code snippet below:
var blob = new Blob([data], { type: 'text/plain' });
var downloadLink = angular.element('<a></a>');
downloadLink.attr('href', window.URL.createObjectURL(blob));
downloadLink.attr('download', test.txt);
downloadLink[0].click();
I've been trying to create and open a file in the browser. It seems to be working fine in Chrome, but I'm encountering issues in Firefox.
There are no error messages displayed.
Can you help me identify what I might be missing?