AngularJS: Creating multiple factories for every endpoint?
问题 following some examples, it appears that we can inject a factory which would contain an endpoint for a rest service like so services.factory('Recipe', ['$resource', function($resource) { return $resource('/recipes/:id', {id: '@id'}); }]); This looks great, but imagine I have other endpoints i.e. /users/:id, and /groups/:id, as you can imagine the number of different endpoints are going to increase. So it is good practice to have a different factory for each endpoint so having .. services