There is the following code:
angular.module('app.posts.services', []).factory('Post', ['$resource', 'API_ENDPOINT', ($resource, API_ENDPOINT) ->
$resource(API_ENDPOINT, { id: '@id' }, {
update: {
method: 'PUT'
}
})
]).value('API_ENDPOINT', 'http://somedomainname.com/users/:user_id/posts/:id')
But for the update method I want to change the URL format: "http://somedomainname.com/posts/:id". How can I do it?