Skip to content

Problems with Vue router push #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Vahagn-Zaqaryan opened this issue Apr 16, 2020 · 2 comments
Closed

Problems with Vue router push #199

Vahagn-Zaqaryan opened this issue Apr 16, 2020 · 2 comments

Comments

@Vahagn-Zaqaryan
Copy link

Thanks

Hi everyone,

First of all, I wanna say thanks, to every member of this boilerplate it's just awesome. Some of the patterns and features are useful and sometimes can save hours of development time.

Now the problem 😢

Recently I was trying to build a basic Vue app and I used this boilerplate as a reference.
When I was building the routing part I've noticed an error in my console after debugging I found out that the issue was appearing when I was trying to logout.

This is what I've done differently
Instead of using Vue <router-link/> component as done in this boilerplate, I used this.$router.push(...)

As show here
image

And this is the error
image

Steps to reproduce

  1. In vue-enterprise-boilerplate's nav bar add a button
  2. Create a method logout as shown above
  3. Add click event on the button
  4. Login using mock API credentials
  5. Click newly created logout button

What is expected?

Navigating to logout then redirection to save route without errors.

@andreiTn
Copy link

You might want to check this vuejs/vue-router#2881 (comment)

@Vahagn-Zaqaryan
Copy link
Author

@andreiTn you're right. I didn't get any errors. Thank you so much for the reference! It seems like that this is just putting tape on the problem, but when I explored the solution in detail, everything got in their places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants