I use window.open
in my ng-click function to download files.
Files can be of type .xls, .pdf, .doc .
Following is the sample code.
$scope.download = function(urls){
angular.forEach(urls, function (value, key) {
window.open(value,'_blank');
});
}
.xls and .doc files can be downloaded directly.But .pdf files opens in a new tab. Is there any solution?