1
I have this method in my controllerJS script and would need to use the Response of this method in another controllerJs.
How do I do ?
app.controller("loginController", function($scope, $http, $location){
$scope.usuarios = {};
$scope.autenticar = function() {
$http.post("/usuarioLogadoPermissoes", $scope.usuarios).then(
function(response) {
$scope.usuarios = response.data;
var jsonAux = JSON.stringify(response.data);
localStorage.setItem("usuarioLogado",jsonAux);
},
function(response) {
console.log(response);
});
};
});