Routing-controllers: Using typedi

Created on 31 Dec 2018  路  4Comments  路  Source: typestack/routing-controllers

How can I integrate typedi with my controllers? For example let's say I would like to set a redis client instance in my typedi container, then how can I use the redis client instance? The example in the README is very broad and unclear for me.

awaiting answer

Most helpful comment

Just use Container.set to provide a redis instance, then place @Service above the controller class, place proper @Inject in constructor/class field and remember about useContainer(Container)

All 4 comments

Any news?

Just use Container.set to provide a redis instance, then place @Service above the controller class, place proper @Inject in constructor/class field and remember about useContainer(Container)

Stale issue message

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

szabobar picture szabobar  路  4Comments

codedoge picture codedoge  路  6Comments

OysteinAmundsen picture OysteinAmundsen  路  3Comments

gruckion picture gruckion  路  5Comments

davidquintard picture davidquintard  路  4Comments