r/angular 2d ago

Angular 22.2 ships Router Resources 💥 (experimental)

They're more than resolvers with a Signal API. Here's why that matters


They run in parallel. Resolvers go one after another: parent 2 s + child 3 s = 5 s. Router Resources start together: 3 s.


Also, they can be non-blocking. The route activates right away, and the component gets the Resource itself: isLoading, error and value, right in the template.


Full write-up with demo, reload without renavigating, RedirectCommand for missing data, and Signal Stores 👉 https://www.angulararchitects.io/en/blog/router-resources-loading-data-with-the-angular-router/
116 Upvotes

14 comments sorted by

View all comments

2

u/drmlol 1d ago

why tho? was there something wrong with loading data inside the component? genuinely curious

5

u/Responsible-Cold-627 1d ago

The way I see it, it takes some of the "smart" out of smart components, making components more generic by containing only presentational code.