Trying to manipulate the response.data to add isLoggedin = true in the response using .map but its giving me an error of "map" is not a function.
vm.dataResponse = response.data.map(function(data){
data.isLoggedIn = false;
});
Trying to do this so I can have a data to reference whether the user is logged in or not to show (login/sign out). Or I could use $rootScopebut I thought using global is not ideal?
$rootScope.isLoggedIn = false;
then in my vm.login function the $rootScope will then be set to true, this works but when I refresh the page it goes back to false.
console.log(response.data)prints?