Error handling in Rxjs Observables | Angular 13 | 2022

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

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

  • @MadhuAnugu
    @MadhuAnugu 2 года назад

    Awesome sir, thank you

  • @tranquillityEnthusiast
    @tranquillityEnthusiast 2 года назад

    Great sir.

  • @Faheem4449
    @Faheem4449 2 года назад

    Thank you ❤️

  • @balajibalamurugan8053
    @balajibalamurugan8053 2 года назад

    Hi, Great video by the way!.
    I have some regarding async pipe,
    In this video you have used, a single observable of string that errors out and you have displayed in the template using async in the template
    how do we handle it when we use objects that error out or when we use ngFor using async pipe. hope you get my question.

    • @JSFrameworks
      @JSFrameworks  2 года назад +1

      while using objects or arrays, we need to emit the default value usually empty [] or {} from the catchError block
      eg: in case of ngFor with async pipe,
      catchError((err) => {
      return of([]);
      }),

    • @balajibalamurugan8053
      @balajibalamurugan8053 2 года назад +1

      @@JSFrameworks Ok, what if I have to an error message like ' No data available '. If have to do that i have to check if an array or object is empty, is that correct?

    • @JSFrameworks
      @JSFrameworks  2 года назад

      In the catch error block you might need to set an indicator, that an error occurred

    • @balajibalamurugan8053
      @balajibalamurugan8053 2 года назад +1

      @@JSFrameworks can you update the repo with these implementation

    • @JSFrameworks
      @JSFrameworks  2 года назад

      Updated the repo

  • @g-luu
    @g-luu 2 года назад

    Awesome.

  • @leninnani5222
    @leninnani5222 2 года назад

    Hi, which extension you are using for auto completion code??? @ time stamp 6:40