# Class InjectorService

Injector for factories and services

#### Hierarchy

- AbstractInjector
  - InjectorService

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

##### Index

### Constructors

constructor

### Properties

cache
modules
path
providerInjector
strictDi

### Methods

factory
get
has
injectionArgs
instantiate
invoke
loadNewModules

## Constructors

### constructor

- new InjectorService(
  strictDi: boolean,
  providerInjector: ProviderInjector,
  ): InjectorService

  #### Parameters

  - strictDi: boolean

    Indicates if strict dependency injection is enforced.

  - providerInjector: ProviderInjector

  #### Returns InjectorService

  Overrides AbstractInjector.constructor

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

## Properties

### cache

cache: any

Inherited from AbstractInjector.cache

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

### modules

modules: {}

Inherited from AbstractInjector.modules

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

### path

path: any[]

Inherited from AbstractInjector.path

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

### providerInjector

providerInjector: ProviderInjector

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

### strictDi

strictDi: boolean

Inherited from AbstractInjector.strictDi

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

## Methods

### factory

- factory(serviceName: string): any

  #### Parameters

  - serviceName: string

  #### Returns any

  Overrides AbstractInjector.factory

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

### 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

### has

- has(name: string): boolean

  #### Parameters

  - name: string

  #### Returns boolean

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

### 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