码迷,mamicode.com
首页 > 其他好文 > 详细

10.23 angular关于$resource

时间:2016-10-23 02:55:28      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:tor   turn   ret   param   word   区分   trie   service   not   

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的

所以这部分我是自己写的



10.23 angular关于$resource

标签:tor   turn   ret   param   word   区分   trie   service   not   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!