10.23 angular关于$resource

angular.module('myApp.services').factory('Entry', function($resource) {
  return $resource('/api/entries/:id'); // Note the full endpoint address
});

之后 Entry 就会有如下方法
  1. get()

  2. query()

  3. save()

  4. remove()

  5. delete()

然而现在的项目api 并不是靠verb来区分crub的

所以这部分我是自己写的



原文地址:https://www.cnblogs.com/AlexNull/p/5988849.html