ReadJsonSrvc.js

angular.module('homepage').
factory('ReadJsonSrvc', function ($http) {
    function readJson(filename) {
        return $http.get('../../../json/' + filename + '.json');
    }

    return {
        readJson: readJson
    };
});