Help Angular by taking a 1 minute survey!Go to surveyHome

ConstructorSansProvider

Configures the Injector to return an instance of a token.

See more...

      
      interface ConstructorSansProvider {
  deps?: any[]
}
    

Description

For more details, see the "Dependency Injection Guide".

Properties

Property Description
deps?: any[]

A list of tokens which need to be resolved by the injector. The list of values is then used as arguments to the useClass constructor.

Usage notes

Example

@Injectable(SomeModule, {deps: []}) class MyService {}
      
      @Injectable(SomeModule, {deps: []})
class MyService {}