好的,所以我认为我在这里遗漏了一些基本的东西,但我无法通过阅读文档和其他示例来弄清楚。我在工厂有这样的资源:
loteManager.factory('Lotes', function($resource) {
  return $resource('./api/lotes/:id',{ id:"@id" }, {
     get:  {method:'GET', isArray:true}
   });
});
我的控制器:
loteManager.controller('LoteCtrl',
  function InfoCtrl($scope, $routeParams, Lotes) {
    Lotes.get(function (response){
      console.log(response);
    });
});
当我像这样手动定义 id 时它可以工作,$resource('./api/lotes/21'所以我认为问题是将 id 传递给工厂,但我已经尝试添加params:{id:"@id"},但这也不起作用。