var promise = $http.get('data/category.json');
promise
.then(
function(data){
$scope.category = data
},
function(error) {
console.log(error);
}
);
promise.then(function1).then(function2).then(function3)
var workIngWithData = function(dataObj) {
console.info(dataObj);
// Здесь можно работать с data
};
$http.get('data/category.json').success(function(data) {
$scope.category = data;
workIngWithData(data);
});