为什么AngularJS抛出错误的扩充

Why does AngularJS throw bad augmentation error

本文关键字:扩充 错误 出错 AngularJS 为什么      更新时间:2024-01-19

当我将src链接中angular的scr代码文件从1.2.2更改为1.5.0时,我一直收到错误,即代码与1.2.2配合得很好,但如果我将其更改为1.5.0

        Error: ng:areq
        Bad Argument
        Argument 'Controller_index' is not a function, got undefined
        Description
        AngularJS often asserts that certain values will be present and truthy using a helper function. If the assertion fails, this error is thrown. To fix this problem, make sure that the value the assertion expects is defined and truthy. I know 1.2.2 is outdated but I am using the same thing and I don't know whats new in 1.5.0 and how to change it.As per my knowledge it looks fine to me. 

该错误表示您尚未将Controller_index注册为控制器。尝试添加:

module.controller('Controller_index', Controller_index);

这是1.2到1.3之间的突破性变化。