I've been able to use the following to get my jSON which is fine but I've been told that using a Factory and Service would be a better option. For the life of me I'm unable to get anything working and I can't even see why I should use a Factory.
Could someone advise why or at least help me out at all? My main requirement here is to get the jSON and then pass it through into an <li></li> list for each object (I haven't tried to get this working yet).
theApp.controller('MenuSideController', ['$scope','$http', function ($scope, $http){
$http.get('/directory/assets/inc/category.php').success(function(data) {
$scope.list = data;
});
}]);