# Class ProviderInjector

Injector for providers

#### Hierarchy

- AbstractInjector
  - ProviderInjector

- Defined in src/core/di/internal-injector.js:152

##### Index

### Constructors

constructor

### Properties

cache
modules
path
strictDi

### Methods

factory
get
injectionArgs
instantiate
invoke
loadNewModules

## Constructors

### constructor

- new ProviderInjector(cache: any, strictDi: boolean): ProviderInjector

  #### Parameters

  - cache: any
  - strictDi: boolean

    Indicates if strict dependency injection is enforced.

  #### Returns ProviderInjector

  Overrides AbstractInjector.constructor

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

## Properties

### cache

cache: any

Inherited from AbstractInjector.cache

- Defined in src/core/di/internal-injector.js:159

### modules

modules: {}

Inherited from AbstractInjector.modules

- Defined in src/core/di/internal-injector.js:26

### path

path: any[]

Inherited from AbstractInjector.path

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

### strictDi

strictDi: boolean

Inherited from AbstractInjector.strictDi

- Defined in src/core/di/internal-injector.js:23

## Methods

### factory

- factory(caller: string): 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 src/core/di/internal-injector.js:167

### get

- get(serviceName: string): any

  Get a service by name.

  #### Parameters

  - serviceName: string

  #### Returns any

  Inherited from AbstractInjector.get

  - Defined in src/core/di/internal-injector.js:35

### injectionArgs

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

  Get the injection arguments for a function.

  #### Parameters

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

  #### Returns any[]

  Inherited from AbstractInjector.injectionArgs

  - Defined in src/core/di/internal-injector.js:67

### instantiate

- instantiate(type: Function | any[], locals?: any, serviceName?: string): 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 src/core/di/internal-injector.js:124

### invoke

- invoke(
  fn: string | Function | any[],
  self?: any,
  locals?: any,
  serviceName?: string,
  ): 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 src/core/di/internal-injector.js:94

### `Abstract` loadNewModules

- loadNewModules(): void

  #### Returns void

  Inherited from AbstractInjector.loadNewModules

  - Defined in src/core/di/internal-injector.js:137