Uploaded June 2026 | Updated November 2026, 10 hours ago
In this video, we move into Phase 3 of the Modern Angular course and connect shared state to a visible UI element users can trust.
After creating a CartService in the previous lesson, we now surface that state in the header by showing a reactive cart badge that updates instantly as products are added.
In this video, you'll learn:
• How to model cart entries with a CartItem interface and quantity
• How to upgrade addToCart logic to increment quantity for existing products
• How to compute total cart count with a computed signal
• How to inject CartService in Header and read shared state in the template
• How to use Angular Material badge bindings for reactive cart feedback
• Why accessibility labels and badge descriptions matter for cart UX
📦 Source code repository:
github.com/loiane/modern-angular
🎥 Full Modern Angular course playlist:
youtube.com/playlist?list=PLGxZ4Rq3BOBqJfR254ZMuBfFRMeyr162U
📌 This course is for:
• Developers new to Angular
• Developers upgrading from older Angular versions
🔔 Subscribe to follow the full Modern Angular course.
⏱️ Chapters
00:00 Introduction
00:38 How the Pieces Connect
01:26 Upgrading the Cart Service
06:57 Inject CartService into Header
08:33 Adding the Badge
10:17 Live Demo
#ModernAngular #AngularCourse
In this video, we move into Phase 3 of the Modern Angular course and connect shared state to a visible UI element users can trust.
After creating a CartService in the previous lesson, we now surface that state in the header by showing a reactive cart badge that updates instantly as products are added.
In this video, you'll learn:
• How to model cart entries with a CartItem interface and quantity
• How to upgrade addToCart logic to increment quantity for existing products
• How to compute total cart count with a computed signal
• How to inject CartService in Header and read shared state in the template
• How to use Angular Material badge bindings for reactive cart feedback
• Why accessibility labels and badge descriptions matter for cart UX
📦 Source code repository:
github.com/loiane/modern-angular
🎥 Full Modern Angular course playlist:
youtube.com/playlist?list=PLGxZ4Rq3BOBqJfR254ZMuBfFRMeyr162U
📌 This course is for:
• Developers new to Angular
• Developers upgrading from older Angular versions
🔔 Subscribe to follow the full Modern Angular course.
⏱️ Chapters
00:00 Introduction
00:38 How the Pieces Connect
01:26 Upgrading the Cart Service
06:57 Inject CartService into Header
08:33 Adding the Badge
10:17 Live Demo
#ModernAngular #AngularCourse










