Calling RESTful web services in AngularJS using the ngResource module

All web service methods are now available for the Bicycles application view. We can start integrating the AngularJS application with the web services endpoints. This process will initially reduce the functionality from the previous chapter, but the material covered in this book should allow you to rebuild it using web services this time around.

Using the $resource service

The AngularJS module ngResource is created to provide functionality for interaction with RESTful web services using its $resource service. Installing this module is similar to installing ngRoute in the previous chapter, as shown in the following command:

Install-Package AngularJS.Resource -Version 1.2.15

After ...

Get Learning AngularJS for .NET Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.