Improve this Doc

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

The controller with the name '{0}' is not registered.

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.

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.