Exploring Angular's Resource API
summary
Angular's new Resource API claims to replace subscription-heavy fetching with a signal-first model centered on resource(), httpResource(), streamingResource(), automatically tracking signal dependencies and auto-refetching when they change. It exposes a single signal with ready/loading/error states, a built-in reload method, and an HTTP wrapper for HttpClient plus a streaming mode for SSE/WebSocket. Example refactors halve component code; an Arduino IoT dashboard implementation works. Caveats: read signals inside the request function and check status before accessing value.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:11The Observable jungle
- 6:37Introducing Resource API
- 9:56Three flavors of Resource
- 17:07Refactoring to Resource API
- 22:06Common pitfalls
- 23:57Resource vs RXJS
- 25:49Future of Angular
- 26:56Key takeaways
related talks
26mAngular Resources: Everything you need to know
19mReactive Thinking with Angular Signals and httpResource
24mAngular Architecture using Signals
36mEffective Signals in Angular 19 and above: Rules and Helpers
46mThe Future of Angular: Faster, Lighter, Stronger
19mAngular Signals: A Look Under the Hood and Beyond
31mSignals & fine grained reactivity in Angular
20mAngular v20
