I have a standard angular code, that is triggered when button is clicked:
$scope.downloadAll = function () {
$http.get("download.php?id=" + $scope.id).success(function (data) {
}).error(function () {
$scope.status = "Error: can not download table data from server.";
});
}
but my php script returns a zip archive and its contents thus ends up in javascript variable, data. I would like to modify the behaviour so that the zip archive is offered by browser to store on local disk. How I would achieve that, keeping the angular button handler?