这是我在 Git Hub 中的示例代码:
https://github.com/Mellon/KarmaWithRequirejs.git
运行“grunt test”时,出现此错误。
Error: [ng:areq] Argument 'MyController' is not a function, got undefined
http://errors.angularjs.org/1.3.14/ng/areq?p0=MyController&p1=not%20a%20function%2C%20got%20undefined
at assertArg (/Users/csun/FrontEnd/KarmaWithRequirejs/node_modules/angular/angular.js:1580)
at assertArgFn (/Users/csun/FrontEnd/KarmaWithRequirejs/node_modules/angular/angular.js:1591)
at /Users/csun/FrontEnd/KarmaWithRequirejs/node_modules/angular/angular.js:8431
at /Users/csun/FrontEnd/KarmaWithRequirejs/test/myControllerSpec.js:13
at invoke (/Users/csun/FrontEnd/KarmaWithRequirejs/node_modules/angular/angular.js:4185)
at workFn (/Users/csun/FrontEnd/KarmaWithRequirejs/node_modules/angular-mocks/angular-mocks.js:2364)
undefined