Class: ResourceDirective

ResourceDirective

ResourceDirective scans a `$resource` directive and executes a request. A request for the resource is executed at $parse time and the resulting response is put into scope.

Constructor

new ResourceDirective(engine)

Parameters:
Name Type Description
engine HTTPEngine
Source:
Example
<caption>Example schema</caption>:
  "$resource": {
     "name": "person":,
     "request": {
       "url": "/api/persons",
       "method": "GET"
      },
      "links"{}
  }
The $resource schema must have only one property, this property is used as
the name of the resource when adding to scope.