angular-restful-resource

An AngularJS Factory built around $resource, adds update action which uses a PUT method

Angular Core Dependency: 1.2.4

Added by: Sam Deering

GitHub

Repository

azzamallow/angular-restful-resource

Stats

Stars: 1

Watchers: 1

Forks: 0

Module Description

angular-restful-resource

An AngularJS Factory built around $resource, adds update action which uses a PUT method

install

bower install angular-restful-resource

usage

Make sure you include the module in your application config

angular.module('myApp', [
  'restfulResource',
  ...
]);

Define your resource as you would with $resource

'use strict';

angular.module('myApp')
  .factory('Listing', function(restfulResource) {
    return restfulResource("/listing/:id", { id: '@id' });
});

Now you can invoke an update which will perform a PUT

listing = Listing.get({id: 1});
// ... change listing
listing.$update();

Module stats last updated: 2015-06-07 05:48:57

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!