Hi Edwin, Paul,
I wanted to trigger downloads from angular also, here is how I achieved it
but I'm not sure if this is what ye are looking for
$http({
method: 'GET',
url: 'http://localhost/products/excel/'
}).success(function(data, status, headers, config) {
var element = angular.element('<a/>');
element.attr({
href: 'data:attachment/excel;charset=utf-8,' +
encodeURI(data),
target: '_self',
download: 'products.xls'
})[0].click();
});
Regards
Jonathan
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.