7
I have a function that does a redirect:
vm.pagarUpload = function() {
$http({
method: 'POST',
url: API.url + 'app/service.php?t=pagarUpload',
data: {
nome: vm.nomeUpload,
email: vm.emailUpload,
cpf: vm.cpfUpload
}
}).then(function successCallback(response) {
console.log('redirecionando...');
window.location.href = "https://minhaurl.com/payment.html?code=" + response.data;
});
}
But I need that instead of directing to another page open in another tab, I can not use the direct target in the tag <a>
because I need the answer of the POST. I also can not use the window.open('http://url...','_blank')
as it is detected as pop-up and is blocked. I wonder if there is any other way to do this?