Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

390
Views
Servicio de llamadas dentro de ngdobootstrap

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)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Agregue el forwardRef al servicio en el constructor,

@Inject(forwardRef(() => 'someservice')) private services : someservice

Hay más detalle aquí

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!