Improve this Doc View Source $controllerProvider
- $controller
- provider in module ng
The $controller service is used by Angular to create new controllers.
This provider allows controller registration via the register method.
Methods
-
has(name);
Parameters
Param Type Details name string
Controller name to check.
-
register(name, constructor);
Parameters
Param Type Details name string
Object
Controller name, or an object map of controllers where the keys are the names and the values are the constructors.
constructor function()
Array
Controller constructor fn (optionally decorated with DI annotations in the array notation).
-
allowGlobals();
If called, allows
$controller
to find controller constructors onwindow
*Deprecated: (since v1.3.0) (to be removed in v1.7.0)This method of finding controllers has been deprecated.
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.5.11/docs/api/ng/provider/$controllerProvider