angular.module('starter.services', [])

.factory('Recipes', function($log, $http) {
    return {
        all: function() {
          return $http({method: 'GET', url: 'indian_recipes.json'})
            .success(function(data, status, headers, config) {
              $log.info('recipes JSON success', data.recipes.length, data.recipes);
            })
            .error(function(data, status, headers, config) {
              $log.info('recipes JSON error', data);
            });
        },
    };
})

.factory('Categories', function($log, $http) {
    return {
        all: function() {
          return $http({method: 'GET', url: 'recipe_categories.json'});
        },
    };
})

;
