View source Improve this doc

$controllerProvider

service in module ng

Description

The $controller service is used by Angular to create new controllers.

This provider allows controller registration via the register method.

Methods

  • register(name, constructor)

Parameters

ParamTypeDetailsnamestringObject

Controller name, or an object map of controllers where the keys are the names and the values are the constructors.

constructorFunctionArray

Controller constructor fn (optionally decorated with DI annotations in the array notation).

  • register(name)

Parameters

ParamTypeDetailsnamestringObject

Name of the filter function, or an object map of filters where the keys are the filter names and the values are the filter factories.

Returns

Object

Registered filter instance, or if a map of filters was provided then a map of the registered filter instances.