O'Reilly logo

MEAN Web Development by Amos Q. Haviv

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

Introducing the ngResource module

In Chapter 7, Introduction to AngularJS, we mentioned the $http service as means of communication between the AngularJS application and your backend API. While the $http service provides the developer with a low-level interface for the HTTP request, the AngularJS team figured out they could better help developers when it comes to RESTful APIs. Since the REST architecture is well structured, much of the client code dealing with AJAX requests could be obfuscated using a higher-level interface. For this purpose, the team created the ngResource module, which provides the developer with an easy way to communicate with a RESTful data source. It does so by presenting a factory, which creates an ngResource object that ...

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