vue-router
vue-router copied to clipboard
backport navigation guard return values
What problem does this feature solve?
being able to return a value in a navigaiton guard:
router.beforeEach(to => {
if (!user)
return { name: 'login', query: { redirectTo: to.fullPath } }
})
### What does the proposed API look like?
Like v4. X
<!-- generated by vue-issues. DO NOT REMOVE -->
Some features cannot be backported without rewriting big parts of the router. I tried porting back as much as I could in the limited time I have.
If anybody wants to backport the navigation guard return value, that would be nice