文档
here说:
url – {string} – action specific url override. The url templating is supported just like for the resource-level urls.
我想用这个好的功能,我试过这个:
angular.module("experience",['ngResource']) .factory('Experience',function ($resource,identity) { return $resource("api/experiences/:id",{},{ queryAll : { method : 'GET',url : 'api/companies/' + identity.id + '/experiences',isArray : true } }); });
你看我试图覆盖queryAll方法的url.但这不起作用,查询仍然发送url api / experience.这是真的支持还是我做错了?谢谢你的帮助.