# Class NgModule

Modules are collections of application configuration information for components: controllers, directives, filters, etc. They provide recipes for the injector to do the actual instantiation. A module itself has no behaviour but only state. A such, it acts as a data structure between the Angular instance and the injector service.

Since this is an internal structure that is exposed only via the Angular instance, it contains no validation of the items it receives. It is up to the instantiator on modules to do the actual validation.

- Defined in core/di/ng-module.js:26

#####
Index

### Constructors

constructor

### Properties

configBlocks
infoState
invokeQueue
name
requires
runBlocks

### Methods

animation
component
config
constant
controller
decorator
directive
factory
filter
info
provider
run
service
value

##
Constructors

### constructor

- new NgModule(name, requires, configFn?): NgModule

- #### Parameters

  - name: string

    Name of the module

  - requires: string[]

    List of modules which the injector will load before the current module

  - `Optional` configFn: Function

  #### Returns NgModule

  - Defined in core/di/ng-module.js:32

##
Properties

### configBlocks

configBlocks: any[][]

- Defined in core/di/ng-module.js:53

### infoState

infoState: any

- Defined in core/di/ng-module.js:59
- Defined in core/di/ng-module.js:73

### invokeQueue

invokeQueue: any[][]

Holds a collection of tasks, required to instantiate an angular component

- Defined in core/di/ng-module.js:50

### name

name: string

- Defined in core/di/ng-module.js:39

### requires

requires: string[]

Holds the list of modules which the injector will load before the current module is loaded.

- Defined in core/di/ng-module.js:44

### runBlocks

runBlocks: Function[]

- Defined in core/di/ng-module.js:56

##
Methods

### animation

- animation(name, animationFactory): NgModule

- #### Parameters

  - name: string
  - animationFactory: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:213

### component

- component(name, options): NgModule

- #### Parameters

  - name: string
  - options: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:123

### config

- config(configFn): NgModule

- #### Parameters

  - configFn: Function

  #### Returns NgModule

  - Defined in core/di/ng-module.js:104

### constant

- constant(name, object): NgModule

- #### Parameters

  - name: string
  - object: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:94

### controller

- controller(name, ctlFn): NgModule

- #### Parameters

  - name: string
  - ctlFn: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:238

### decorator

- decorator(name, decorFn): NgModule

- #### Parameters

  - name: string
  - decorFn: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:183

### directive

- directive(name, directiveFactory): NgModule

- #### Parameters

  - name: string
  - directiveFactory: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:196

### factory

- factory(name, providerFunction): NgModule

- #### Parameters

  - name: string
  - providerFunction: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:136

### filter

- filter(name, filterFn): NgModule

- #### Parameters

  - name: any
  - filterFn: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:225

### info

- info(value): any

- #### Parameters

  - value: any

  #### Returns any

  - Defined in core/di/ng-module.js:70

### provider

- provider(name, providerType): NgModule

- #### Parameters

  - name: string
  - providerType: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:170

### run

- run(block): NgModule

- #### Parameters

  - block: Function

  #### Returns NgModule

  - Defined in core/di/ng-module.js:113

### service

- service(name, serviceFunction): NgModule

- #### Parameters

  - name: string
  - serviceFunction: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:153

### value

- value(name, object): NgModule

- #### Parameters

  - name: string
  - object: any

  #### Returns NgModule

  - Defined in core/di/ng-module.js:84