- $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 stringController name to check.
-
register(name, constructor);
Parameters
Param Type Details name stringObjectController name, or an object map of controllers where the keys are the names and the values are the constructors.
constructor function()ArrayController constructor fn (optionally decorated with DI annotations in the array notation).
-
allowGlobals();
If called, allows
$controllerto find controller constructors onwindow
Please login to continue.