Hi Sridhar, Usually also to display any data on a page we query to server using http.get request and show it on the page right. So where exactly we use this resolver. Thanks Harshini
There was a usecase in my job where we needed to implement it. Basically, we have a rotative banner (carousel) which gathers info from a mongo database. We are using the swiper library to display de carousel and it must not load before the data is fetched from the database. So, we used a resolve guard to get all the info we need (images, text to display, configuration, etc) and only then we to the route of the swiper component.
Kindly help sir data is showing in console but not in vew. I have tried all posible ways its only showing dot and when am printing the object its showing object but when calling keys of api not showing anything
Thanks, Sridhar. It is eye-opening!
Thanks buddy!!!
Hi Sridhar,
Usually also to display any data on a page we query to server using http.get request and show it on the page right. So where exactly we use this resolver.
Thanks
Harshini
Thank you so much, you made Angular learning so easy
Glad to hear that
Any Practical use case of this?
yes, to collect required data before reaching component.
There was a usecase in my job where we needed to implement it. Basically, we have a rotative banner (carousel) which gathers info from a mongo database. We are using the swiper library to display de carousel and it must not load before the data is fetched from the database. So, we used a resolve guard to get all the info we need (images, text to display, configuration, etc) and only then we to the route of the swiper component.
what if the call fails in resolve? can we handle it in component ?
instead of ng g g , we should be saying ng g r
Kindly help sir data is showing in console but not in vew.
I have tried all posible ways its only showing dot and when am printing the object its showing object but when calling keys of api not showing anything
Hello, Please could you continue Mean Stack series, Thanks In Advance
Hi Nermen. Yes continuing that series as well
Routing part error come
Hi Jaya. Whats the error?
Source code