AngularJS cannot find module with latest RequireJS

后端 未结 2 1383

I just upgraded to RequireJS 2.1.1 - I have an AngularJS app I\'m loading with it. I get \"No module: app\" from angular before the main define runs.

It works fine

相关标签:
2条回答
  • 2020-12-15 01:08

    You need to add this js file: angular-resource.js

    0 讨论(0)
  • 2020-12-15 01:12

    You should manually bootstrap angular and remove the ng-app attribute in that case since the module is not available on dom ready:

    angular.bootstrap document, ['app']
    

    at the end of your define function

    0 讨论(0)
提交回复
热议问题