TypeDI
Github
Search…
Current Release
Old documentation
Getting Started
Usage Guide
Container API
@Service decorator
@Inject decorator
Service Tokens
Inheritance
Usage with TypeORM
Advanced Usage
Usage without TypeScript
Getting Started
Usage
Powered By
GitBook
Usage with TypeORM
To use TypeDI with routing-controllers and/or TypeORM, it's required to configure them to use the top-level TypeDI container used by your application.
1
import { useContainer as rcUseContainer } from 'routing-controllers';
2
import { useContainer as typeOrmUseContainer } from 'typeorm';
3
import { Container } from 'typedi';
4
5
rcUseContainer(Container);
6
typeOrmUseContainer(Container);
Copied!
Previous
Inheritance
Next
Advanced Usage
Last modified
8mo ago
Copy link