$http({
url: '/verifyUserName',
data:{username:$scope.username},
method: "POST"
})
.then(function(response) {
$scope.allowGameStart = true;
})
Is there a way to access the variable $scope.allowGameStart outside of the promise in AngularJS, without having to include my code inside the then() function?