requireJS+angularJS+angular-ui-router环境搭建报错angular.bootstrap is not a function,Module 'myApp' is not

在搭建环境时报错。记录一下

requireJS+angularJS+angular-ui-router环境搭建报错angular.bootstrap is not a function,Module 'myApp' is not

代码结构

requireJS+angularJS+angular-ui-router环境搭建报错angular.bootstrap is not a function,Module 'myApp' is not

main.js文件内容

requireJS+angularJS+angular-ui-router环境搭建报错angular.bootstrap is not a function,Module 'myApp' is not

routeconfig文件

requireJS+angularJS+angular-ui-router环境搭建报错angular.bootstrap is not a function,Module 'myApp' is not

index.html文件

requireJS+angularJS+angular-ui-router环境搭建报错angular.bootstrap is not a function,Module 'myApp' is not

原因:index.html加入ng-app导致会报Module 'myApp' is not a available.

          main.js加入angular参数,导致报angular.bootstrap错误

requireJS+angularJS+angular-ui-router环境搭建报错angular.bootstrap is not a function,Module 'myApp' is not



解决办法:去掉index.html中的ng-app,去掉main.js中的angualr参数