title: how to make Generic method for rest call in angularjs
body: <p>how to make Generic method for rest call in angularjs ?</p>
  
  <p>i have tried for single request, it's working fine</p>
  
  <pre><code>UIAppRoute.controller('test', ['$scope', 'checkStatus', function($scope, checkStatus) {
      $scope.data = {};
      checkStatus.query(function(response) {
        $scope.data.resp = response;
      });
  }])
  
  
  
  UIAppResource.factory('checkStatus', function($resource){
      return $resource(baseURL + 'status', {}, {'query': {method: 'GET', isArray: false}})
  })
  </code></pre>
  
  <p>I want to make this as generic for all the request</p>
  
  <p>Please share any sample,.. thanks in advance</p>