Javascript Angularjs资源多参数

Javascript Angularjs资源多参数,javascript,angularjs,angularjs-resource,Javascript,Angularjs,Angularjs Resource,我想使用具有多个参数的资源方法。我这样尝试过 var mytest = $resource('/localhost/:id&:test', {id: '@id',test:'@test'}); mytest.getCached({id:'1',test:'test'}, function() { .. }) 但它不起作用。'/localhost/:id&:test'定义正确吗?或者有什么错误的部分吗?事实上,我之前犯过这个错误,我用“#”解决了这个问题,你可以试试 var mytes

我想使用具有多个参数的资源方法。我这样尝试过

var mytest = $resource('/localhost/:id&:test', {id: '@id',test:'@test'});

mytest.getCached({id:'1',test:'test'}, function() { .. })

但它不起作用。'/localhost/:id&:test'定义正确吗?或者有什么错误的部分吗?

事实上,我之前犯过这个错误,我用“#”解决了这个问题,你可以试试

var mytest = $resource('/localhost/#:id&:test', {id: '@id',test:'@test'});