Reputation: 12212
I have a simple setup of an angularjs application. The scripts are loaded with requirejs. When loading the application, I get Uncaught Error: No module: myapp
in the console.
The scripts are loaded in order scripts.js (requirejs configuration), jquery, angular and then app.
Here is the Plunker.
Upvotes: 1
Views: 1723
Reputation: 50335
You need to remove the ng-app
directive from the html
element. See the updated Plunker.
First, the directive is not necessary, because you already manual bootstrap AngularJS (and ng-app
is simply the shortcut to do that).
Second, the reason AngularJS reports the error is because when it processes ng-app
(upon document ready event), the module file (in app.js
) has not been loaded by RequireJS (that's why you have to do manual bootstrap in the first place).
Upvotes: 4