我想要生成angularjs使用ngResource這個網址:如何生成ngResource網址有兩個參數
http://url_api/contact/58dc70f18e029b1338a97abc/address/58e3e3988e029a1aec5ad465
而是我得到這個:
http://url_api/contact/58dc70f18e029b1338a97abc/address?address_id=58e3e3988e029a1aec5ad465
這是我廠
factory('Addresses', function($resource) {
return $resource(url_base + 'contact/:id/address',{},{
get: {
method: 'GET',
isArray: true,
url: url_base + 'contact/:id/address'
},
save:{
method: 'POST'
},
delete:{
method: 'DELETE',
url: url_base + 'contact/:id/address/:addressId',
// params:{
// id: '@_id',
// addressId: '@_addressId'
// }
}
});
})
,這是我以後怎麼稱呼它
Addresses.delete({id:$scope.id_contact,address_id:address_id_delete})
請任何人都可以幫助我嗎?我很着急