简体   繁体   中英

$HTTP service in Angular.js

I am new in Angular.js , and just learning it.

I am looking on $http service to send AJAX request.

I got three ways to send AJAX request form Angular.js .

These are here

  1. AJAX calls via the $http service.
  2. JSONP calls via the $http service.
  3. REST type calls.

Actually I am getting confuse to these three process, that which is better for me to use.

Which will be more efficient and reliable for me to implement it in my project?

My main aim to make it high throughput.

Any suggestion will be helpful for me.

If you are a beginner I would recommend you to go with the $http. Which is pretty straight forward and simple to use and serves most of the regular development tasks. The other two requires fair amount of understanding though they do the same job making ajax calls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM