Advertisement
vargin

ngResource

Nov 30th, 2015
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function res($resource) {
  2.  return $resource('/someurl/:id', {id:'@id'});
  3. }
  4. function actionCtrl(Entry){
  5.  this.entries = Entry.query();
  6.  console.log(entries);
  7. }
  8. angular.module('controllers',['ngResource']).factory('Entry',['$resource',res]).controller('actCtrl',['Entry',actionCtrl]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement