I'm new to AngularJs and i'd like to perform several requests from my service. So far, i managed to performed one request only:
My service file :
ticketServices.factory('Category', ['$resource',
function($resource){
var resource = $resource(
baseUrl('/admin/ticket/?format=json'), {}, {
query: {
method:'GET',
params: {},
isObject: true
}
});
return resource;
}
]);
My controller file :
ticketApp.controller('ticketCtrl', ['$scope', 'Category', function ($scope, Category) {
Category.query();
}]);
I'd like to be able to do this for instance :
Category.fecthCities();
Category.fetchMessage();
But i can't figure out how to add these requests to my service.
Any help would be appreciated.