$http({method: 'GET', url: url+'/api/?action=get_res'}).success(function(res) {
$scope.data=res;
}).error(function(res) {
alert("error");
});
<ul class="records_list">
<li ng-repeat="item in data" ng-class="{important:item.important==1}">
<span>{{item.name}}</span>
<input type="checkbox" data-id="{{$index}}" data-uid="{{item.id}}">
</li>
</ul>
app.controller('oneCtrl', ['$scope','$rootScope', function($scope, $rootScope) {
$rootScope.var=1;
}]);
app.controller('twoCtrl', ['$scope','$rootScope', function($scope, $rootScope) {
console.log($rootScope.var); //1
}]);