Mark a method parameter for DI injection
The parameter will be resolved from the request-scoped container when the controller method is invoked.
DI token to resolve (class or symbol)
async show( ctx: RouterContext, @InjectParam(UserService) userService: UserService) { } Copy
async show( ctx: RouterContext, @InjectParam(UserService) userService: UserService) { }
async show( ctx: RouterContext, @InjectParam(DI_TOKENS.Cache) cache: ICacheService) { } Copy
async show( ctx: RouterContext, @InjectParam(DI_TOKENS.Cache) cache: ICacheService) { }
Mark a method parameter for DI injection
The parameter will be resolved from the request-scoped container when the controller method is invoked.