爱编程
AngularJS错误:Error: [ng:areq] Argument 'MyCtrl' is not a function, got undefined
2015-3-3 Jessie







AngularJS错误:Error: [ng:areq] Argument 'MyCtrl' is not a function, got undefined



错误显示:



AngularJS:Error: [ng:areq] Argument 'MyCtrl' is not a function, got undefined








处理方法:



出现这个错误,请确认下图圈出来的代码,在AngularJS v1.3.14中,需要下图这样写,如果是v1.0.3就可以直接写控制器方法PhoneListCtrl,然后设置ng-controller="PhoneListCtrl"



AngularJS错误处理:Error: [ng:areq] Argument 'MyCtrl' is not a function, got undefined