Manually bootstrapping AngularJS and then getting the module

后端 未结 4 963
闹比i
闹比i 2021-02-14 00:18

Generally, I\'d do the following and there would be an ng-app in my HTML:

var myApp = angular.module(\"myApp\", []);

myApp.controller(\"AttributeCt         


        
4条回答
  •  不知归路
    2021-02-14 00:57

    I don't know if this is just in the example code you have here but:

    angular.bootstrap($("#angularApp", ["myApp"]));
    

    should be

    angular.bootstrap($("#angularApp"), ["myApp"]);
    

    Your code for retrieving the module should work.

提交回复
热议问题