We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using ngtable with requires.js and got the following error: TypeError: angular is undefined in line 49, var app = angular.module('ngTable', []);
I have the requirejs configure like this: require.config({ paths: { 'angular': "../Scripts/angular", 'angular-route': "../Scripts/angular-route", 'ng-table': "../Scripts/ng-table", ... }, shim: { 'angular': ['jquery'], 'angular-route': ['angular'], 'ng-table': "../Scripts/ng-table", ...
The result htmp page head shows angular.js is before ngTable. Why 'angular' is undefined in ngtable.js?
Thanks,
jwu
The text was updated successfully, but these errors were encountered:
I'm hoping you already figured this out. Just in case, the value of the property 'ng-table' in your shim object should be
['angular']
not
"../Scripts/ng-table"
Thus you end up with
require.config({ paths: { 'angular': "../Scripts/angular", 'angular-route': "../Scripts/angular-route", 'ng-table': "../Scripts/ng-table", ... }, shim: { 'angular': ['jquery'], 'angular-route': ['angular'], 'ng-table': ['angular'], ...
Hope this helps.
Sorry, something went wrong.
don't forget to export angular in shim otherwise u'll get angular' is undefined
No branches or pull requests
I am using ngtable with requires.js and got the following error:
TypeError: angular is undefined in line 49, var app = angular.module('ngTable', []);
I have the requirejs configure like this:
require.config({
paths: {
'angular': "../Scripts/angular",
'angular-route': "../Scripts/angular-route",
'ng-table': "../Scripts/ng-table",
...
},
shim: {
'angular': ['jquery'],
'angular-route': ['angular'],
'ng-table': "../Scripts/ng-table",
...
The result htmp page head shows angular.js is before ngTable. Why 'angular' is undefined in ngtable.js?
Thanks,
jwu
The text was updated successfully, but these errors were encountered: