Why can't I use routing in vuejs?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
43 views
Hi. You can't block a transition neautorizovanem the user to the page Bar.

https://jsfiddle.net/ugdfgemu/

At 1m the routing to the page Bar is redirected to Foo, clicking on the Bar, he successfully renders the component Bar.
by | 43 views

2 Answers

0 like 0 dislike
remember, routing is working. The witnesses are that there are many

let banned = ['/foo', '/bar'] if (banned.includes(to.path)) return false
by
0 like 0 dislike
Forgot to add else in beforeEach, like so. Or so.

And so you get that you are being redirected to foo, and then again - on bar if no checking was not.
by

Related questions

0 like 0 dislike
1 answer
asked Apr 9, 2019 by tr0yka
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Apr 9, 2019 by alexmixaylov
0 like 0 dislike
1 answer
asked May 21, 2019 by kirill-93
0 like 0 dislike
2 answers
110,608 questions
257,187 answers
0 comments
40,796 users