title: Error: 'undefined' is not a constructor (evaluating 'new ngTableParams')
body: <p>I am trying to use ng-table but stuck with ngTableParams. I keep getting the</p>
  
  <pre><code>[Error] Error: 'undefined' is not a constructor (evaluating 'new ngTableParams')
  </code></pre>
  
  <p>error, no matter what things I try.</p>
  
  <p>The current code looks like</p>
  
  <pre><code>$scope.tableParams = new ngTableParams({
      page: 1,
      count: 200,
      sorting: {
          name: 'asc'
      }
  }, {
      groupBy: 'area',
      total: TheData.length,
      getData: function($defer, params) {
          // use build-in angular filter
          var orderedData = params.sorting() ? $filter('orderBy')(TheData, params.orderBy()) : TheData;
          $defer.resolve(orderedData.slice((params.page() - 1) * params.count(), params.page() * params.count()));
      }
  });
  </code></pre>
  
  <p>The app and controller are invoked with ngTable and ngTableParams:</p>
  
  <pre><code>angular.module('MegaList', ['ui.bootstrap', 'ngTable']);
  angular.module('MegaList').controller('DisplayMegaList', ['$scope', 'ngTableParams', function($scope, $http, ngTableParams) {
      ...
  }
  </code></pre>
  
  <p>I think I've already tried all the ways to compose <code>'ngTable'</code>, <code>'ngTableParams'</code> and <code>ngTableParams</code> keywords together, but it still just doesn't work.</p>
  
  <p>What should I try then?</p>