I would like to make the transition between my pages as seamless as possible. Is there a way for things to happen in this order:
- Click on button to change page
- Load page to which I'm moving fully (or partially) (no page transition yet)
- Do page transition
I'd rather have it this way than click, redirect, and then wait on the page that everything loads.
This loading process would also include calling methods from the new page to do things like make calls to the database etc.
CodePudding user response:
Sounds like a text-book use case for Angular resolvers: You might want to take a look at this.
To summarize the concept: when attempting to navigate to a particular route and there's a resolver configured, everything would be resolved (eg. load some data from backend, prepare it etc) before navigating to the route.