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

224
Views
Código angular dentro de Subscribe () Cómo ejecutar Synchronouly
_subscriptions.push( // Update list on OG selection ogViewModel.current$.subscribe( (group) => { this.groupUuid = group.ogUuid; this.groupId = group.id; this.getDevices(); this.getSubOgs(); this.updateGroup(group); }, ),

Tengo un bloque de código dentro de subscribe. Sin embargo, parece que no se ejecutan en orden. this.getSubOgs() se ejecuta antes que this.getDevices(). Ambas son llamadas HTTP que devuelven un observable. ¿Cómo me aseguro de que this.getDevices() se ejecute primero? Haga clic para ver los códigos

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

esto es básicamente la sugerencia de @MishaMashina

 _subscriptions.push(ogViewModel.current$.subscribe( (group) => { this.groupUuid = group.ogUuid; this.groupId = group.id; this.getDevices(); this.updateGroup(group); }, ),

tanto getDevices() como getSubOgs() siguen siendo métodos separados

en

 public getDevices() { this.myApiClient.getDevices().Subscribe( let onlyThisTime: boolean = true; (next) => doStuff (error) => doErrorStuff () => {if(onlyThisTime){this.getSubOgs();}} )}
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!