It enables you to write organised, testable code based on the loose coupling pattern.
You can always access the injector via
app.injector or inject it
Using constructor injection or method parameter injection
It is not recommended to inject objects to constructor because it can lead to circular reference.
Using property injection it is possible to inject circular references
Inherited injections supported as well.
Anything you inject on a base class will be available to child classes.
Remember not to use
@defineon the parent class.
you can to register 2 classes with the same id but sometimes it's need to override the registered class for example in testing env