Sha256: 9846b0e27665a5b2a5632072deade0c13322ac91479007710b2d7134a38e46b1
Contents?: true
Size: 976 Bytes
Versions: 20
Compression:
Stored size: 976 Bytes
Contents
;(function() { 'use strict'; function Profiles($resource) { var ProfileResource = $resource('/social_networking/profiles/:id', { id: '@id' }, { 'update': {method: 'PUT'} }); var ProfilesResource = $resource('/social_networking/profiles'); function Profile() {} Profile.getAll = function() { return ProfilesResource.query().$promise; }; Profile.getOne = function(id) { return ProfileResource.get({ id: id }).$promise; }; // Update a Goal on the server. Profile.update = function(attributes) { var profile = new ProfileResource(); return profile.$update({ id: attributes.profile.id, icon_name: attributes.iconSrc }); }; return Profile; } angular.module('socialNetworking.services') .service('Profiles', ['$resource', Profiles]); })();
Version data entries
20 entries across 16 versions & 1 rubygems