Estoy creando una aplicación usando angular y llamando a la llamada api dentro del método ngdobootrap. Recibo un error al inyectar el servicio dentro de bootstrap:
export class AppModule { constructor(private upgrade: UpgradeModule, private router: Router, private location: Location,private services : someservice) { } ngDoBootstrap(moduleRef) { this.getdata() } getdata() { this.services.data().subscribe((res: any) => { console.log(res) }, error => { }) }Error:
zone.js:682 Unhandled Promise rejection: Trying to get the AngularJS injector before it being set. ; Zone: <root> ; Task: Promise.then ; Value: Error: Trying to get the AngularJS injector before it being set. at injectorFactory (vendor.js:148805:15)