DEV Community

Discussion on: Why Your Angular App Is Not Working: 7 Common Mistakes

Collapse
 
manicsquirrel profile image
Carla Lewis 🐿️ • Edited

As someone that just started using Angular a couple of months ago, my biggest block has been wrapping my head around Observables and Promises. Specifically, when several APIs calls are dependent upon the data returned from several other api calls.

I now understand the basics of promise chaining and forkJoin, but it all feels so messy that I can't help but think there are better ways to achieve my desired results.

The problem is, all of the online examples and tutorials either never call an API, instead mocking a data return, or they return data into a component or service global variable rather than immediately using the returned value (or promise of a returned value) in another api call.

This has made learning painful.

Collapse
 
valeriopisapia profile image
Valerio

Do you have any specific scenario for that? I would like to try to help you with some practical examples (I even could write an article :) )

Collapse
 
manicsquirrel profile image
Carla Lewis 🐿️

Give me a few days and I'll come up with an example that can be shared. I would *love*to know the best way to code it.

Thank you!

Collapse
 
clarkd527 profile image
Daniel L Clark

Four months into angular and I am finally wrapping my head around rxjs. I feel your pain.