vue router "savedposition" with ajax call
To implement the "savedPosition" feature in Vue router with an AJAX call, you can follow these steps:
- Use the Vue router's scrollBehavior to set the position.
- Make an AJAX call to retrieve the saved position from the server.
- Set the saved position as the default value for scrollBehavior.
- Update the saved position on route navigation using the router's navigation guards.
- Make another AJAX call to save the current position when the user navigates away from the current route.