ValueProvider

Interface defining a Value type provider.

See more...


interface ValueProvider<T = any> {
  provide: InjectionToken
  useValue: T
  inject?: never
}

See also

Description

For example:


const connectionProvider = {
  provide: 'CONNECTION',
  useValue: connection,
};

Properties

Property Description
provide: InjectionToken

Injection token

useValue: T

Instance of a provider to be injected.

inject?: never

This option is only available on factory providers!