diff --git a/README.md b/README.md index 18235023..91a053f1 100644 --- a/README.md +++ b/README.md @@ -1402,6 +1402,7 @@ That's it, now you can inject your services into your controllers: ```typescript @Controller() +@Service() export class UsersController { constructor(private userRepository: UserRepository) {} @@ -1409,6 +1410,8 @@ export class UsersController { } ``` +Note: As TypeDI@0.9.0 won't create instances for unknown classes, you have to decorate your Controller as a `Service()` as well. See [#642](https://github.com/typestack/routing-controllers/issues/642) + For other IoC providers that don't expose a `get(xxx)` function, you can create an IoC adapter using `IocAdapter` like so: ```typescript