A framework-agnostic way of phrasing this question is "How to register another service with the service locator?"
The Injector is set up to be immutable, both the interface and the implementation.
interface Injector {
abstract get(token: any, notFoundValue?: any): any;
}
interface https://github.com/angular/angular/blob/master/packages/core/src/di/injector.ts implementation https://github.com/angular/angular/blob/master/packages/core/src/di/reflective_injector.ts
How do you add another provider (dynamically, not via a module)?
How does Angular do this itself when it is loading new modules after bootstrapping, for example via the router?