AngularJS cannot find module with latest RequireJS

后端 未结 2 1386

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: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

提交回复
热议问题