Closed pbalan closed 3 years ago
You can get all injectables from application instance from within your component.
@inject(CoreBindings.APPLICATION_INSTANCE) private readonly application: RestApplication,
For example, here I am trying to get a datasource from the application instance
const redisDS = (await this.application.get(
`datasources.${this.config.name}`,
)) as juggler.DataSource;
I think this can help you get any of the bindings including user component. Hope this helps.
@pbalan can I close this issue now ?
Hi,
I'd like to develop my application logic as components and use this as the base application.
I'm not clear about how I can inject the user into the component especially when using a user-modifiable entity as the abstract class.
Could you please provide me a direction on it?