Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ClassProvider<T>

Interface defining a Class type provider.

For example:

const configServiceProvider = {
provide: ConfigService,
useClass:
  process.env.NODE_ENV === 'development'
    ? DevelopmentConfigService
    : ProductionConfigService,
};
see

Use class

see

Injection scopes

publicapi

Type parameters

  • T = any

Hierarchy

  • ClassProvider

Index

Properties

Properties

provide

provide: string | symbol | Type<any> | Abstract<any> | Function

Injection token

Optional scope

scope: Scope

Optional enum defining lifetime of the provider that is injected.

useClass

useClass: Type<T>

Type (class name) of provider (instance to be injected).

Generated using TypeDoc