Loading image src using a variable containing base64 data in AngularJS
The content of the ng-src needs to be interpolated: Try this: <img data-ng-src=”https://stackoverflow.com/questions/22018776/{{image.dataURL}}”/>
The content of the ng-src needs to be interpolated: Try this: <img data-ng-src=”https://stackoverflow.com/questions/22018776/{{image.dataURL}}”/>
As of now, it has been made possible to use <a download> in Chrome. Using dispatchEvent, you can download any string as file (even with a custom filename) whenever you want. Here’s a utility function to use it: var downloadFile = function(filename, content) { var blob = new Blob([content]); var evt = document.createEvent(“HTMLEvents”); evt.initEvent(“click”); $(“<a>”, … Read more
These are my test results. I’ll try with Ogg as well if prompted. Legend W = Wave, WD = Wave with base64 encoded data:uri M = MP3, MD = MP3 with base64 encoded data:uri Test results Chrome 6.0.472.55: M, MD (no wave) Firefox 3.6: W, WD (no mp3:s) Firefox 4.0b1: W, WD (no mp3:s) iPad … Read more
Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements in IE. According to http://msdn.microsoft.com/en-us/library/cc848897%28v=vs.85%29.aspx: Data URIs are supported only for the following elements and/or attributes. object (images only) img input type=image link CSS declarations that accept a URL, such as background, backgroundImage, and so on. Data URIs can … Read more