Q:

Angular how to return value from http.post success?

i have a code in my angular controller
$scope.message = '';
$http.post('/save/').success(function(data) {                  
    $scope.message = "success";
});
console.log($scope.message);
//get empty string?

why after i run, i get empty string on $scope.message? 
how http.post when success return value because i want to reuse the value for my another function. thanks anyway.

A:

What you are looking for is this:
$scope.$watch("message", function(value){
  console.log($scope.message);
}); 

Here is  a sample plnkr example I've made

