Hello, I was doing some tests. And if I want to do a conditional for a single button, I can send it to a Partial passing a parameter, or not. And I made a button calling this function: Controller
$scope.continuar = function(){
$http.get('http://localhost:8080/api/getbyemail/[email protected]')
.success(function(retorno) {
console.log(retorno);
$scope.infos = retorno;
if (retorno.usuarioId){
console.log("Vai passar COM o parametro");
window.location.href = "pagina/usuarioId";
} else {
console.log("Vai passar SEM o parametro");
window.location.href = "pagina";
}
})
.error(function(erro) {
console.log(erro);
});
};
It worked, it went, BUT, it reloaded my application, and my intention is to actually use the SPA, both partials are part of the same application. I did not want to recharge it.
Is there any way to do this?
Thank you.