【发布时间】:2015-10-15 13:59:57
【问题描述】:
我在前端使用 AngularJs,并且正在使用 RESTful 服务。 要使用该服务,我必须将发送请求有效负载编写为 json,并将得到响应为 json。
我将有一些与表单输入、指令、服务等绑定的 Angular 模型......
Angular 是否提供了任何将服务层与前端设计隔离的好方法,或者我们应该自己实现,还是应该继续将前端与服务紧密耦合?
【问题讨论】:
-
在ng-resource中有transformResponse/transformRequest
标签: javascript json angularjs web-services rest