angular dependency resolution code example

Example 1: angular injector.create example

using Angular Injector
Internal class in @angular/core, StaticInjector, ReflectiveInjector 
uses resolveAndCreate([ClassNames])
the resolve variable from above resolver.get(ClassName) will give the object.
All this is handled internally when we inform the angular with the providers

Example 2: injection of generic services in angular

@NgModule({
  imports: [CommonModule],
  declarations: [Component3Component],
  exports: [Component3Component],
  providers: [ApiService, { provide: MY_API_ENDPOINT, useValue: "api.end.point.3" }]
})
export class App2Module { }