• Overview
@angular/core

Inject

decorator

Warning: String tokens are not recommended.

API

    
      @Inject ({})
    
    

token

any

A DI token that maps to the dependency to be injected.

Description

Warning: String tokens are not recommended.

Use an InjectionToken or a class as a token instead.

Jump to details