Improve this Doc View Source angular.mock.module

From Get docs
< Improve this Doc ngMock‎ | functionAngularjs/docs/1.8/api/ngmock/function/angular.mock.module


Improve this Doc View Source angular.mock.module

  1. function in module ngMock

Overview

NOTE: This function is also published on window for easy access.
NOTE: This function is declared ONLY WHEN running tests with jasmine or mocha

This function registers a module configuration code. It collects the configuration information which will be used when the injector is created by inject.

See inject for usage example


Usage

angular.mock.module(fns);

Arguments

Param Type Details
fns stringfunction()Object any number of modules which are represented as string aliases or as anonymous module initialization functions. The modules are used to configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an object literal is passed each key-value pair will be registered on the module via $provide.value, the key being the string name (or token) to associate with the value on the injector.


© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.
https://code.angularjs.org/1.8.2/docs/api/ngMock/function/angular.mock.module