💥 Reactive Angular - The Single Data Observable Pattern

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

Комментарии • 7

  • @brampeirsful
    @brampeirsful 4 года назад +10

    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.

  • @13clucky
    @13clucky 4 года назад +3

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

  • @santigarciallorente
    @santigarciallorente 4 года назад +1

    Thanks, very useful and simple pattern

  • @StephenMoreira
    @StephenMoreira 4 года назад +1

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

  • @tradewithcpr1464
    @tradewithcpr1464 4 года назад +1

    Wonderful content in the video

  • @SinaGilassi
    @SinaGilassi 4 года назад +1

    Good Job, tx.

  • @k4nful
    @k4nful 3 года назад

    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.