Skip to content

Instantly share code, notes, and snippets.

@srobbin
Created June 9, 2014 21:24
Show Gist options
  • Save srobbin/c853ae38065c271c107f to your computer and use it in GitHub Desktop.
Save srobbin/c853ae38065c271c107f to your computer and use it in GitHub Desktop.
notes.factory('Notes', function($resource) {
return $resource('/notes/:id.json', {id: '@id'});
});
notes.factory('UserNotes', function($resource) {
return $resource('/user/:user_id/notes/:note_id.json', {user_id: '@user_id', note_id: '@note_id'});
});
UserNote.query({user_id: 3})
UserNote.get({user_id: 3, note_id: 1})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment