码迷,mamicode.com
首页 > 其他好文 > 详细

Error: $controller:ctrlreg A controller with this name is not registered.

时间:2017-10-17 15:06:49      阅读:524      评论:0      收藏:0      [点我收藏+]

标签:http   anti   注册   his   div   you   consul   with   ase   

The controller with the name ‘SomeController‘ is not registered.
名称为‘SomeController‘的控制器没注册 ;

Description

This error occurs when the $controller() service is called with a string that does not match any of the registered controllers. The controller service may have been invoked directly, or indirectly, for example through the ngController directive, or inside a component / directive /route definition (when using a string for the controller property). Third-party modules can also instantiate controllers with the $controller()service.

当使用不匹配任何注册控制器的字符串调用$ controller()服务时,会发生此错误。 控制器服务可以直接或间接地被调用,例如通过ngController指令或组件/指令/路由定义(当使用控制器属性的字符串时)。 第三方模块还可以使用$ controller()服务实例化控制器。

Causes for this error can be:

  1. Your reference to the controller has a typo. For example, in the ngController directive attribute, in a component definition‘s controller property, or in the call to $controller().
  2. You have not registered the controller (neither via Module.controller nor $controllerProvider.register().
  3. You have a typo in the registered controller name.

Please consult the $controller service api docs to learn more.

导致此错误的原因可能是:

您对控制器的引用有错字。 例如,在ngController指令属性中,在组件定义的控制器属性中,或在$ controller()的调用中。
您尚未注册控制器(不通过Module.controller或$ controllerProvider.register())。
您在注册的控制器名称中输入错字。
请参阅$ controller service api docs了解更多信息。

Error: $controller:ctrlreg A controller with this name is not registered.

标签:http   anti   注册   his   div   you   consul   with   ase   

原文地址:http://www.cnblogs.com/JackeyLove/p/7680985.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!