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的

所以这部分我是自己写的



posted @   Alex_Null  阅读(139)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示