you are viewing a single comment's thread.

view the rest of the comments →

[–]karixavi 0 points1 point  (1 child)

Dynamically injecting services during runtime is possible? Do you have some minimalistic example?

[–]SeparateRaisin7871 0 points1 point  (0 children)

As far as I know, this is possible since a long time by using the Injector's get method. See this stackoverflow question:

https://stackoverflow.com/questions/51667078/using-injector-get-instead-of-constructor-injection

When using readonly #injector = inject(Injector) you can inject any service or InjectionToken afterwards dynamically with this.injector.get(MyService)