O'Reilly logo

Mastering Web Application Development with AngularJS by Pawel Kozlowski, Peter Bacon Darwin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Communicating with a Back-end Server

More often than not web applications need to communicate with a persistent store to fetch and manipulate data. This is especially true for CRUD-like applications where data editing is the essential part.

AngularJS is well equipped to communicate with various back-ends using XMLHttpRequest (XHR) and JSONP requests. It has a general purpose $http service for issuing XHR and JSONP calls as well as a specialized $resource service to easily target RESTful endpoints.

In this chapter, we are going to examine different APIs and techniques to communicate with various back-ends. In particular, we are going to learn how to:

  • Make basic XHR calls using the $http service and test code relying on $http
  • Effectively ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required