JSFiddle

wortzwei's public fiddles

  • Metadata passthrough for ngResource queries

    When using the $resource factory to access RESTful APIs it might by necessary to consume resources, that do not return the data as expected by $resource, this is often the case for server-side pagination, where the result is usually not a plain array but an object that contains the result as well as additional metadata such as a total count, page size, etc... This fiddle demonstrates how to circumvent the limitations of $resource as of version 1.2.12 to enable you to consume data with any structure and pass through any metadata while retaining all the behavior provided by $resource.