title: ng-table TypeError: undefined is not a function
body: <p>I'm using an old version of ng-tables 0.4.2 and if I upgrade to 0.4.3 it displays the error in my chromium console</p>
  
  <pre><code>TypeError: undefined is not a function
      at reload (http://localhost:3000/assets/ng-table/ng-table.min.js?body=1:140:160)
      at Object.fn (http://localhost:3000/assets/ng-table/ng-table.min.js?body=1:196:24)
      at Scope.$digest (http://localhost:3000/assets/angular/angular.js?body=1:5226:31)
      at Scope.$apply (http://localhost:3000/assets/angular/angular.js?body=1:5305:28)
      at done (http://localhost:3000/assets/angular/angular.js?body=1:3182:26)
      at completeRequest (http://localhost:3000/assets/angular/angular.js?body=1:3306:9)
      at XMLHttpRequest.xhr.onreadystatechange (http://localhost:3000/assets/angular/angular.js?body=1:3279:13) 
  </code></pre>
  
  <p>Here is how I've configured my tableParams</p>
  
  <pre><code>  page = $location.search()['page'] # Get page from the URL
  
    # data is created by ngTableParams
    $scope.tableParams = new ngTableParams({
      page: if page then page else 1,
      count: 10,
      sorting: { invoice_no: 'desc'}
    }, {
      total: 0,
      filterDelay: 500,
  
      # ng-table will ask for updated data, this is where it gets it from.
      getData: ($defer, params) -&gt;
        # Go get a list of debtors
        Invoice.query params.url(), (data) -&gt;
          params.total($scope.total)
          $location.search(params.url()) # Params into URL
          orderedData = (if params.sorting then $filter('orderBy')(data, params.orderBy()) else data) # Sort
          $defer.resolve(orderedData) # Paginate / update table with new data
    })
  </code></pre>
  
  <p>I do include ng-tables in my module and ngTableParams in my controller.</p>
  
  <p><strong>Update: Passing mock data works</strong></p>
  
  <p>If I do the following there is no error.</p>
  
  <pre><code># ng-table will ask for updated data, this is where it gets it from.
  getData: ($defer, params) -&gt;
    $defer.resolve([{invoice_no: 1}])
  </code></pre>
  
  <p><strong>Update: Using Restangular instead of angular-resource works</strong></p>
  
  <p>So doing my query using Restangular works</p>
  
  <pre><code>getData: ($defer, params) -&gt;
    Restangular.all('invoices').getList()
    .then((data) -&gt;
      return data
    )    
  </code></pre>
  
  <p>Maybe in ng-table 0.4.3 and above I can no longer use angular-resource? or I'm just doing it wrong. Here is my invoice resource (which was working in ng-table 0.4.2).</p>
  
  <pre><code>Invoice = ['$resource', 'apiPrefix', ($resource, apiPrefix) -&gt;
    $resource( apiPrefix + "/invoices/:id",
      id: "@id"
    ,
      # Add update method
      update: {method: "PUT"}
    )
  ]
  
  angular
    .module('paisApp')
    .factory('Invoice', Invoice)
  </code></pre>