I have an angular directive that uses an iframe to download a file. I want to be able to detect when that iframe is loaded, but the event isn't firing.
var iframe = angular.element('<iframe></iframe>');
iframe.on("load", function() { console.log("loaded"); });
iframe.attr('src', url);
iframe.css('display', 'none');
angular.element(document.body).append(iframe);