TanStackT
TanStack12mo ago
5 replies
military-pink

Angular Tanstack Query

I am using Tanstack in my application and when a user logs in, I have a query that runs as part of the Auth to retrieve user profile info.
I want to use the results of the query in a route guard to ensure users complete their profile before being able to access any other pages but I can't access anything from the query after injecting the AuthService because the query has not finished.

Looking for some advice on how to achieve what I'm looking for.
Was this page helpful?