I am trying to get values from a JSON file using this function:
function getarray(){
  $http.get('http://localhost/prebuilt/countries.json')
  .success(function(data) {
    $scope.countries = data;
  });
  return data;
} 
I need these return values to be used in another function in the same control block. The problem is that it doesn't return anything.
my controller starts like this:
angular.module('theme.charts-flot', [])
       .controller('FlotChartsController', 
                   ['$scope', 
                    '$timeout', 
                    '$http',
                    '$parse',
                    function ($scope, $timeout, $http, $parse) {
and ia m using a template. this is the controller for the chart that is being updated real time.
 
     
    