title: Make function in rootscope return in scope
body: <p>I have made a rootscope function with a attribute. it is getting some data from a the db. </p>
  
  <p>I want to use this rootscope function in a controller and put the data what i get in a variable. </p>
  
  <pre><code>$rootScope.get_option = function(option_name){
          $http.post("server/read.php",{'subject': "options", "args": option_name })
          .success(function (response) {
              console.log(response);
              $rootScope.option_get_value = response;
  
          });
  
          if($rootScope.option_get_value){
              return $rootScope.option_get_value;
          }
  
      }
  </code></pre>
  
  <p>And this i what i have in the controller </p>
  
  <pre><code>    $scope.subscription.reduced_hourrate = $rootScope.get_option('verlaagd_tarief');
      console.log($scope.subscription.reduced_hourrate);
  </code></pre>
  
  <p>When i run the script, i see in the logs $rootScope function giving me correct value back. But the scope is giving me undefined data back. </p>
  
  <p>Why is this happening? and someone help me of give me some tips?</p>