Skip to content

Dependency Injection in Controllers and Interceptors

Once you have defined and registered your Providers and Components, you can inject them into Controllers and Interceptors following the same pattern as in previous examples.

This is possible because, under the hood, these are also Components. This means they are automatically constructed based on their dependencies.

However, you cannot inject controllers or interceptors into other controllers or interceptors.