# Class ProviderInjector

Injector for providers

#### Hierarchy

- AbstractInjector
  - ProviderInjector

- Defined in core/di/internal-injector.js:157

#####
Index

### Constructors

constructor

### Properties

cache
modules
path
strictDi

### Methods

factory
get
injectionArgs
instantiate
invoke
loadNewModules

##
Constructors

### constructor

- new ProviderInjector(cache, strictDi): ProviderInjector

- #### Parameters

  - cache: any
  - strictDi: boolean

    Indicates if strict dependency injection is enforced.

  #### Returns ProviderInjector

  Overrides AbstractInjector.constructor

  - Defined in core/di/internal-injector.js:162

##
Properties

### cache

cache: any

Inherited from AbstractInjector.cache

- Defined in core/di/internal-injector.js:164

### modules

modules: {}

Inherited from AbstractInjector.modules

- Defined in core/di/internal-injector.js:27

### path

path: any[]

Inherited from AbstractInjector.path

- Defined in core/di/internal-injector.js:25

### strictDi

strictDi: boolean

Inherited from AbstractInjector.strictDi

- Defined in core/di/internal-injector.js:24

##
Methods

### factory

- factory(caller): void

- Factory method for creating services.

  #### Parameters

  - caller: string

    The name of the caller requesting the service.

  #### Returns void

  #### Throws

  If the provider is unknown.

  Overrides AbstractInjector.factory

  - Defined in core/di/internal-injector.js:172

### get

- get(serviceName): any

- Get a service by name.

  #### Parameters

  - serviceName: string

  #### Returns any

  Inherited from AbstractInjector.get

  - Defined in core/di/internal-injector.js:36

### injectionArgs

- injectionArgs(fn, locals, serviceName): any[]

- Get the injection arguments for a function.

  #### Parameters

  - fn: Function | any[]
  - locals: any
  - serviceName: string

  #### Returns any[]

  Inherited from AbstractInjector.injectionArgs

  - Defined in core/di/internal-injector.js:69

### instantiate

- instantiate(type, locals?, serviceName?): any

- Instantiate a type constructor with optional locals.

  #### Parameters

  - type: Function | any[]
  - `Optional` locals: any
  - `Optional` serviceName: string

  #### Returns any

  Inherited from AbstractInjector.instantiate

  - Defined in core/di/internal-injector.js:129

### invoke

- invoke(fn, self?, locals?, serviceName?): any

- Invoke a function with optional context and locals.

  #### Parameters

  - fn: string | Function | any[]
  - `Optional` self: any
  - `Optional` locals: any
  - `Optional` serviceName: string

  #### Returns any

  Inherited from AbstractInjector.invoke

  - Defined in core/di/internal-injector.js:100

### loadNewModules

- loadNewModules(): void

- #### Returns void

  #### Abstract

  Inherited from AbstractInjector.loadNewModules

  - Defined in core/di/internal-injector.js:142