Why does the following piece of code:
angular.module('avafriqueWebApp')
.service('MainService', function ($http) {
var mainService = {
getMenNewArrivals: getMenNewArrivals,
getWomenNewArrivals: getWomenNewArrivals
};
return mainService;
function getMenNewArrivals()
{
return $http.get('data/men-new-arrivals.json');
}
function getWomenNewArrivals()
{
return $http.get('data/women-new-arrivals.json');
}
});
all of a sudden return this error message:
I thought function hoisting in this fashion and crafting some type of interface was a good thing?