Show / Hide Table of Contents
Close
Loading …
There was an error loading this resource. Please try again later.
 Improve this Doc  View Source

$controllerProvider

  1. - $controller
  2. - provider in module ng

Overview

The $controller service is used by AngularJS 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 stringObject

    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).