Sha256: 9cf2c880f5c50ff7ee4d1a010d5a276530ee735c83cf7a28c3d8e43a2a7ae820
Contents?: true
Size: 641 Bytes
Versions: 16
Compression:
Stored size: 641 Bytes
Contents
;(function() { "use strict"; // Service for managing remote Comments function Comments($resource) { var CommentResource = $resource('/social_networking/comments/:id', { id: '@id' }); function Comment() {} // Persist a Comment to the server. Comment.create = function(attributes) { var comment = new CommentResource({ text: attributes.text, itemType: attributes.itemType, itemId: attributes.itemId }); return comment.$save(); }; return Comment; } angular.module('socialNetworking.services') .service('CommentResource', ['$resource', Comments]); })();
Version data entries
16 entries across 16 versions & 1 rubygems