93. Make Http Get Request and use RxJs Operators to transform the response in the Angular.

Поделиться
HTML-код
  • Опубликовано: 27 сен 2020
  • Hi Friends
    In this video, we will see how to make the Http Get Request and use RxJS operators to transform the response in the Angular.
    If you like my video, please subscribe to my channel.
    RUclips Page: / leelawebdev
    Facebook Page: / leelawebdev
    Twitter Page: / leelanarsimha
    Linkedin: / leela-narasimha-reddy-...
    GitHub: github.com/leelanarasimha
    #Angular #leelawebdev

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

  • @siddheshmhatre2389
    @siddheshmhatre2389 Год назад

    🍺🍺

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

    How to create firebase - API

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

    Y to use spread operator

    • @LeelaWebDev
      @LeelaWebDev  3 года назад +1

      Spread operator is used to merge two objects and make single object. In the video we have two objects key and response. I have did video on spread operator in es6 playlist

  • @hafeezbadure736
    @hafeezbadure736 Год назад +4

    getPosts() {
    this.http
    .get('httpclientmodule1-default-rtdb.firebaseio.com/posts.json')
    .pipe(
    map((response) => {
    let posts = [];
    for (let key in response) {
    posts.push(response[key]);
    }
    return posts;
    })
    )
    .subscribe((response) => {
    console.log(response);
    });
    }
    I am getting error on the line , push(response[key]):-- Element implicitly has an 'any' type because expression of type 'string' can't be used to index type 'Object'.
    No index signature with a parameter of type 'string' was found on type 'Object'.ts(7053)

    • @ayushbhardwaj1109
      @ayushbhardwaj1109 Год назад +2

      write posts.push(response[key as keyof typeof response]) above to fix this typescript issue

    • @deepikamohan3086
      @deepikamohan3086 Год назад +1

      @@ayushbhardwaj1109 excellent reply for key and response I was breaking my head from morning where I missed to watch your comments thankyou so much bro