angularjs中Error: [ng:areq]错误产生的原因

作者:admin     字体:[增加 减小]    类型:原创
记录angularjs中Error: [ng:areq]错误产生的原因

用了一段时间的angularjs,时不时产生Error: [ng:areq]错误,如下

Error: [ng:areq] http://errors.angularjs.org/1.3.0/ng/areq?p0=controller1&p1=not%20aNaNunction%2C%20got%20undefined
    at Error (native)
    at http://localhost:3000/plugin/angular/angular.min.js:6:416
    at Mb (http://localhost:3000/plugin/angular/angular.min.js:19:510)
    at nb (http://localhost:3000/plugin/angular/angular.min.js:20:78)
    at http://localhost:3000/plugin/angular/angular.min.js:74:494
    at http://localhost:3000/plugin/angular/angular.min.js:56:415
    at r (http://localhost:3000/plugin/angular/angular.min.js:7:408)
    at M (http://localhost:3000/plugin/angular/angular.min.js:56:281)
    at g (http://localhost:3000/plugin/angular/angular.min.js:51:201)
    at g (http://localhost:3000/plugin/angular/angular.min.js:51:218)

产生上面这个错误的原因是因为没有定义相关的controller