Injector token for dynamic injection.
class Wizard { private injector = inject(Injector); private wand?: Wand; getWand() { return (this.wand ??= this.injector.inject(Wand)); }}const wizard = container.resolve(Wizard);wizard.getWand(); // => Wand Copy
class Wizard { private injector = inject(Injector); private wand?: Wand; getWand() { return (this.wand ??= this.injector.inject(Wand)); }}const wizard = container.resolve(Wizard);wizard.getWand(); // => Wand
Injector token for dynamic injection.