I have a simple $state.go
inside of a login post that will not chang views. It works in the web version, but will not when running ionic.
$scope.login = function(user){
// $state.go('user.exercises');
$http.post('/api/v1/user/login', user)
.success(function(data, status){
console.log(data);
authToken.setToken(data); // this can be taken out, does not affect
$state.go('user.exercises');
})
.error(function(data, status){
$scope.status = data;
});
};
It will run outside the post, but fails to change state inside the post. Also, state it’s going to does work.