You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a button within a router-link that shows a loading indicator when clicked (but still allows opening in a new tab, which should not show a loading indicator).
It would be nice if navigate($event) in the v-slot API could return a promise when it performs a .push/replace() so that I could stop the loading animation when the route fails to load, or succeeds, just like router.push/replace(to) does.
Right now the only way to do this in my app is to implement a programmatic push or replace call, which does not allow opening in a new tab.
Thank you so much!
What does the proposed API look like?
navigate(e) returns a Promise (the result of .push or .replace) if either of those functions are called within navigate(e). If neither is called, return nothing.
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
I am trying to create a button within a
router-link
that shows a loading indicator when clicked (but still allows opening in a new tab, which should not show a loading indicator).It would be nice if
navigate($event)
in thev-slot
API could return a promise when it performs a.push/replace()
so that I could stop the loading animation when the route fails to load, or succeeds, just likerouter.push/replace(to)
does.Right now the only way to do this in my app is to implement a programmatic push or replace call, which does not allow opening in a new tab.
Thank you so much!
What does the proposed API look like?
navigate(e)
returns a Promise (the result of.push
or.replace
) if either of those functions are called withinnavigate(e)
. If neither is called, return nothing.The text was updated successfully, but these errors were encountered: