File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -456,7 +456,23 @@ export class UserRepository {
456
456
457
457
If you need to remove registered service from container simply use ` Container.remove(...) ` method.
458
458
Also you can completely reset the container by calling ` Container.reset() ` method.
459
- This will effectively remove all registered services from the container.
459
+ This will effectively remove all registered services from the container.
460
+
461
+ ## Troubleshooting
462
+
463
+ ### Use TypeDI with routing-controllers and/or TypeORM
464
+
465
+ In order to use typedi with routing-controllers and/or typeorm, it's ** necessary** to tell these libs to use the typedi container.
466
+ Otherwise you may face [ this kind of issue] ( https://github.com/pleerock/typedi/issues/4 ) .
467
+
468
+ ``` Typescript
469
+ import { useContainer as routingUseContainer } from ' routing-controllers' ;
470
+ import { useContainer as ormUseContainer } from ' typeorm' ;
471
+ import { Container } from " typedi" ;
472
+
473
+ routingUseContainer (Container );
474
+ ormUseContainer (Container );
475
+ ```
460
476
461
477
## Samples
462
478
You can’t perform that action at this time.
0 commit comments