Angular Services Explained - Sharing Data Between Components

  Рет қаралды 10,336

Monsterlessons Academy

4 жыл бұрын

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.
► Advanced Angular course ➡️ monsterlessons-academy.com/courses/angular-and-ngrx-building-real-project-from-scratch?
► Download the FREE PDF Now. Pass Your JS Interview with Confidence! ➡️ monsterlessons-academy.com/newsletter_subscribers/javascript_interview?
► Join Thousands of Learners! Start My Advanced Courses Today ➡️ monsterlessons-academy.com/courses?
► Boost Your Knowledge! Read My Popular Blog Posts Here ➡️ monsterlessons-academy.com/posts?
LOOKING FOR THE VIDEO EDITOR? ➡️ ekaterina.kochergina.business@gmail.com
MOST POPULAR COURSES
► Javascript interview questions ➡️ monsterlessons-academy.com/courses/javascript-interview-questions-coding-interview?
► Typescript interview questions ➡️ monsterlessons-academy.com/courses/typescript-interview-questions-coding-interview?
► React interview questions ➡️ monsterlessons-academy.com/courses/react-interview-questions-coding-interview-course?
► Angular Interview Questions ➡️ monsterlessons-academy.com/courses/angular-interview-questions-coding-interview-2023?
► Angular Testing ➡️ monsterlessons-academy.com/courses/angular-testing-unit-testing-angular-and-e2e-testing?
► React Testing ➡️ monsterlessons-academy.com/courses/react-testing-unit-testing-react-and-e2e-testing?
► Building real project with Angular + NgRx ➡️ monsterlessons-academy.com/courses/angular-and-ngrx-building-real-project-from-scratch?
► Building real NestJS API ➡️ monsterlessons-academy.com/courses/nestjs-building-an-api-for-real-project-from-scratch?
► Building real fullstack project ➡️ monsterlessons-academy.com/courses/build-fullstack-trello-clone-websocket-socket-io?
► RxJS Crash Course ➡️ monsterlessons-academy.com/courses/rxjs-crash-course-reactivex-from-zero-to-hero?
SERVICES THAT I'M USING
Learn new skills anytime with Skillshare. ➡️ skillshare.eqcm.net/c/5473521/1085653/4650
Build your website effortlessly with Squarespace ➡️ squarespace.syuh.net/ba6mmx
Get fast delivery and Prime Video with Amazon ➡️ www.amazon.com/tryprimefree?tag=mla01-20
Get affordable domains from Namecheap ➡️ namecheap.pxf.io/21ojA0n
Protect your privacy with NordVPN today! ➡️ nordvpn.sjv.io/jrKWQZ
Ultahost: Fast, reliable hosting for your website. ➡️ ultahost.sjv.io/VmoyAM
CONNECT WITH ME!
► TWITTER - monster_lessons
► INSTAGRAM - monsterlessonsacademy
► FACEBOOK - monsterlessonsacademy
► LINKEDIN - www.linkedin.com/company/monsterlessons-academy
► TIKTOK - www.tiktok.com/@monsterlessonsacademy
REFERENCES
► Source code - github.com/monsterlessonsacademy/monsterlessonsacademy/tree/services-in-angular
TIMESTAMPS
0:00 Introduction
2:47 Creating Angular service
18:08 Sharing Data Between Components Using Service
18:29 Call to action
This video is NOT sponsored. Some product links are affiliate links which means if you buy something I'll receive a small commission.

Пікірлер: 13
@MonsterlessonsAcademy
@MonsterlessonsAcademy 3 жыл бұрын
WATCH NEXT: Angular Interview Questions and Answers - Dominate Your Next Interview - kzbin.info/www/bejne/a3LCin6ii7yAhtEsi=2DCn7yspEAAJ2H6l
@justcoder2868
@justcoder2868 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
@@justcoder2868 You are welcome! I'm happy that you like my videos.
@PIF150O
@PIF150O 3 жыл бұрын
@@MonsterlessonsAcademy Thanks for making this public. Appreciated.
@balls991
@balls991 10 ай бұрын
You are only person who makes Angular understandable for me. Thanks a lot.
@MonsterlessonsAcademy
@MonsterlessonsAcademy 10 ай бұрын
Glad to hear that
@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 жыл бұрын
Move a call to api to service and call service method from each component.
Good teacher wows kids with practical examples #shorts
00:32
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
小丑家的感情危机!#小丑#天使#家庭
00:15
家庭搞笑日记
Рет қаралды 30 МЛН
إخفاء الطعام سرًا تحت الطاولة للتناول لاحقًا 😏🍽️
00:28
حرف إبداعية للمنزل في 5 دقائق
Рет қаралды 78 МЛН