AngularJS: Creating Objects that map to REST Resources (ORM-Style)

前端 未结 7 563
南笙
南笙 2021-01-29 18:09

I\'m pretty new to AngularJS, but I\'m pretty unclear on how to tie it up to my Server\'s REST Api backend.

For example, say I have an \"image\" resource that I get by G

7条回答
  •  清酒与你
    2021-01-29 18:31

    For simple interaction you can use Angular-Resource (http://docs.angularjs.org/api/ngResource.$resource) which can be quite handy for simple REST interaction (to download it go to http://code.angularjs.org/1.0.6/)

    Sadly you only get limited control when using angular resource, and for anything more advanced you will need to create your own services based on Angularjs $http service - http://docs.angularjs.org/api/ng.$http.

    Hope that helps.

提交回复
热议问题