At a recent Jetbrains conference, one of the Angular developers said that the Resource API came about because they were working with the Google Fonts team on zoneless, and realised this is what they needed. I also suspect they are keen to remove all need for rxjs as it is not beginner friendly, and we would typically use rxjs for the back-end calls.
Your explaination is always clear. This API is really interesting and reduces a lot many client side waste code. I hope they will implicitely manage the async call or maybe provide a default management. Please make a video with a complete form management (NEW or EDIT) with this new API. Thanks for your videos!
Yes, very similar to tanstack query! For SSR, I guess it would work depending on when the specific component gets hydrated. There's a new hydrate option with defer...
Yes, patterns will eventually emerge for the resource API for different use cases. Already some have suggested declaring resource in a service so that the component remains dumb. The same can be done with ngrx as well I guess
There is an observable based equivalent to resource called rxResource. More details in the blog post here. push-based.io/article/everything-you-need-to-know-about-the-resource-api
At a recent Jetbrains conference, one of the Angular developers said that the Resource API came about because they were working with the Google Fonts team on zoneless, and realised this is what they needed. I also suspect they are keen to remove all need for rxjs as it is not beginner friendly, and we would typically use rxjs for the back-end calls.
Exactly! RxJS will become optional eventually so this is all in preparation for that.
Thanks Zoaib you always explain new concepts in simplest way.
Glad you liked it, Akram! 🙂
Thank you Zoaib for these videos. We hope you will upload more to make us professional
You're welcome 🤗
Clear, short and informative.
Glad you liked it 😊
Your explaination is always clear.
This API is really interesting and reduces a lot many client side waste code. I hope they will implicitely manage the async call or maybe provide a default management.
Please make a video with a complete form management (NEW or EDIT) with this new API.
Thanks for your videos!
Glad you liked it! And I was thinking of exactly the same thing about an example with forms - would be a good use case of this API.
Will work on it :)
Awesome man! I just subbed to your patreon!!!
Thanks Adam! 🤗
Thank you Zoaib
You're welcome! 😄
Tanstack query but for angular. Would love to see how this get implemented while using angular ssr
Yes, very similar to tanstack query! For SSR, I guess it would work depending on when the specific component gets hydrated. There's a new hydrate option with defer...
Great video. Can you explain the binding between the url parameter and the bookId? Thanks
Thanks 🙏 I already have a video for that: ua-cam.com/video/L2mlrvDYvoA/v-deo.htmlsi=KjJZXhPCmb87XnsF
Do you think there will be any reasonable way to use the Resource API together with state management tools like NGRX?
Yes, patterns will eventually emerge for the resource API for different use cases. Already some have suggested declaring resource in a service so that the component remains dumb. The same can be done with ngrx as well I guess
hi, when we call api, we write func directly in Component Class or service class, upgrade angular 19 make me confuse 😅
It's a best practice to keep it in a service, so that the component does not have much logic and only shows the data fetched
Great video as usual, but one small doubt can't we use httpClient in resource api ? As if we use fetch then the interceptor will not work
There is an observable based equivalent to resource called rxResource. More details in the blog post here.
push-based.io/article/everything-you-need-to-know-about-the-resource-api
@@ZoaibKhan Thanx a lot zoaib
Replace httpClient ?!
Well, not replace exactly, but provide an alternative for now. Also, this is just for reading/fetching data, not for updating/creating.