# Class InjectorService

Injector for factories and services

#### Hierarchy

- AbstractInjector
  - InjectorService

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

#####
Index

### Constructors

constructor

### Properties

cache
modules
path
providerInjector
strictDi

### Methods

factory
get
has
injectionArgs
instantiate
invoke
loadNewModules

##
Constructors

### constructor

- new InjectorService(strictDi, providerInjector): InjectorService

- #### Parameters

  - strictDi: boolean

    Indicates if strict dependency injection is enforced.

  - providerInjector: ProviderInjector

  #### Returns InjectorService

  Overrides AbstractInjector.constructor

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

##
Properties

### cache

cache: any

Inherited from AbstractInjector.cache

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

### modules

modules: {}

Inherited from AbstractInjector.modules

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

### path

path: any[]

Inherited from AbstractInjector.path

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

### providerInjector

providerInjector: ProviderInjector

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

### strictDi

strictDi: boolean

Inherited from AbstractInjector.strictDi

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

##
Methods

### factory

- factory(serviceName): any

- #### Parameters

  - serviceName: any

  #### Returns any

  #### Abstract

  Overrides AbstractInjector.factory

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

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

### has

- has(name): boolean

- #### Parameters

  - name: string

  #### Returns boolean

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

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