💥 Reactive Angular - The Single Data Observable Pattern

preview_player
Показать описание

Check out the PDF E-Books available at the Angular University -


Follow us:

Рекомендации по теме
Комментарии
Автор

combineLatest actually waits for all input Observables to emit at least once, before it starts emitting results.
So in this example the html will only be populated once both courses and lessons have been fetched.
You can use the startWith operator on course$ and lessons$ to overcome this.

brampeirsful
Автор

This video is published in that time when i was stuck on the similar logic on my work. Thank you!

clucky
Автор

Thanks, very useful and simple pattern

santigarciallorente
Автор

I do a pattern very similar to this one, it's super sweet.

StephenMoreira
Автор

okay but your endpoint /courses/id could just retrieves the course with a an array of its lessons and you don't need to combine two observables.

knful