Stratal API Reference
    Preparing search index...

    Function InjectParam

    • Mark a method parameter for DI injection

      The parameter will be resolved from the request-scoped container when the controller method is invoked.

      Type Parameters

      • T

      Parameters

      Returns ParameterDecorator

      async show(
      ctx: RouterContext,
      @InjectParam(UserService) userService: UserService
      ) { }
      async show(
      ctx: RouterContext,
      @InjectParam(DI_TOKENS.Cache) cache: ICacheService
      ) { }