Skip to content

Instantly share code, notes, and snippets.

@LironHazan
Created April 3, 2020 07:27
Show Gist options
  • Save LironHazan/a7158d45ed99d05a34967073bec03958 to your computer and use it in GitHub Desktop.
Save LironHazan/a7158d45ed99d05a34967073bec03958 to your computer and use it in GitHub Desktop.
for blog post
import {Injector, Resolver} from "../src/diy/injector";
import {RendererService} from "./services/renderer.service";
class DiBootstrap {
static run() {
console.log('---------------- | START | -----------------');
// Static injector
// const renderer = Injector.resolve<RendererService>(RendererService);
// renderer.update();
const renderer = Resolver.resolve<RendererService>(RendererService);
renderer.update();
console.log('---------------- | END | -----------------');
}
}
DiBootstrap.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment