I m downloading a file using AngularJS and java from server. Because by Ajax GET request doesn't support downloading a file using jax-rs so I am using an alternative approach for it.
Select the different field from UI, on click submit I want to create a url at app.js and want to assign it's return value to href so that href tag force window to open with a popup to download
<input type="button" onclick="location.href=GetUrl();" value="Submit"/>
function in App.js is
$scope.GetUrl = function() {
// do some computation;
return "url"
}
Can some one help me?