moving $http to service using ng-resource