esvit / ng-table

Simple table with sorting and filtering on AngularJS
http://esvit.github.io/ng-table
BSD 3-Clause "New" or "Revised" License
2.77k stars 851 forks source link

Using webpack results in "TypeError: angular.module is not a function" #1012

Open dennisjac opened 7 years ago

dennisjac commented 7 years ago

Hi, I'm trying to use this module with webpack but have run into the following issue. When I use this code:

require('angular');
console.log(window.angular.module);
require('ng-table');

then I see the following error in the console: Uncaught TypeError: angular.module is not a function

The line the error is reported at looks like this: var ngTableCoreModule = angular.module('ngTable-core', [])

The output of the console.log command shows that angular.module is indeed defined as a function. What do I need to do to be able to use ng-table in a webpack environment?

Vitenok commented 6 years ago

@dennisjac , did you found out why you got this error?