Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. /*Here we define our book model and REST api.*/
  2. var books = $resource('api/books/:id', {
  3. id: '@id'
  4. }, {
  5. query: {
  6. method: 'GET',
  7. isArray: false,
  8. params : {
  9. filter : 'all'
  10. }
  11. },
  12. //I wanted one for search to take in above /search... path
  13. search : {
  14. //not sure how i can define path `/myapp/search/book?key=jerry&value=1`
  15. // is it even possible
  16. method: 'GET',
  17. ...
  18. }
  19.  
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement