[ng:areq] Argument 'XXXXCtrl' is not a function, got undefined

angular.module('MyApp', []) 这里的[]重复了,以后引入新的controller.js文件会覆盖前面那个,所以此处的[]去掉
.controller('MyCtrl', function($scope) {
})
angular.module('MyApp')
.controller('MyCtrl',function(){
})
注意:以后引用新的controller.js文件不用写 [ ]

浙公网安备 33010602011771号