ngResource
A handy module for interacting with RESTful APIs is ngResource
. Instead of using $http
over and over again, we can use ngResource
to define an endpoint with HTTP verbs.
Illustrating $resource
Before we dive into the service, let's see a simple example of using ngResource
.
We'll be showing a more complete example in a moment, but notice that we can create a resource by using the $resource
service. By providing a URL with a spot for an id
parameter, this object will provide us the following methods:
Woah, a RESTful interface for working with a RESTful API.
Last updated