0๐
โ
I was getting this error because I was using an <a>
tag.
<li><a href="#" @click="logout()">Logout</a></li>
So it was going to #
url(which led to the fallback route) instead of invoking the @click
.
Hence I had to use the @click.prevent
to prevent this default behavior of anchor tag:
<li><a href="#" @click.prevent="logout()">Logout</a></li>
0๐
Your Problem is
router.go
the go method accepts an integer as parameter ( see http://router.vuejs.org/en/essentials/navigation.html )
I think you actually want a
router.push({ path: "/login"})
Source:stackexchange.com