Angular Services Explained - Sharing Data Between Components

Поділитися
Вставка
  • Опубліковано 14 лип 2024
  • In this video you will learn about sharing data between components using service in Angular. We can of course just write our API call inside component but then we can't really reuse this code because it's coupled with a component. Services in Angular help us to share data between different components in an easy and dry way.
    🚨IMPORTANT:
    → Advanced Angular course: monsterlessons-academy.com/p/...
    → All my courses: monsterlessons-academy.com/co...
    → Twitter: / monster_lessons
    🕛 TIMESTAMPS:
    0:00 Introduction
    2:47 Creating Angular service
    18:08 Sharing Data Between Components Using Service
    18:29 Call to action
    📚 References:
    → Angular for beginners - Full Playlist: • Angular Course Online ...
    → Source code :github.com/monsterlessonsacad...

КОМЕНТАРІ • 12

  • @MonsterlessonsAcademy
    @MonsterlessonsAcademy  3 роки тому

    Watch next: Rxjs Streams in Angular - Normalizing Data (Map and Pipe Operator) - ua-cam.com/video/lReVSh_7bKs/v-deo.html

  • @balls991
    @balls991 6 місяців тому

    You are only person who makes Angular understandable for me. Thanks a lot.

  • @justcoder2868
    @justcoder2868 2 роки тому

    I managed to get everything working this time and I spotted what I had done wrong in the previous one.
    I your full angular course do you effectively build a MEAN stack (or any other DB) or is it kept solely to the front end? Thanks

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому +1

      Here we write only frontend application and use public API for that (full frontend, angular)
      monsterlessons-academy.com/p/angular-and-ngrx-building-real-project-from-scratch
      Here we exactly the same API which will fit frontend application that we build previously (full backend, db, etc)
      monsterlessons-academy.com/p/nestjs-building-an-api-for-real-project-from-scratch

    • @justcoder2868
      @justcoder2868 2 роки тому

      @@MonsterlessonsAcademy OK I see what you are saying, thanks I will have a look.
      PS: I like your method of teaching and you cover all aspects of what you are doing and why..... sounds obvious but so many do not do this!
      Thanks again you have been a great help to me as a new developer

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому +1

      @@justcoder2868 You are welcome! I'm happy that you like my videos.

    • @PIF150O
      @PIF150O 2 роки тому +1

      @@MonsterlessonsAcademy Thanks for making this public. Appreciated.

  • @kishkinjoshi5097
    @kishkinjoshi5097 2 роки тому

    I am working on an angular project where , I have defined a function to call an get api in component 1 and I want to call this function in component 2 using a service . Can you suggest me how to do it??

    • @MonsterlessonsAcademy
      @MonsterlessonsAcademy  2 роки тому +1

      Move a call to api to service and call service method from each component.