Reputation: 315
I am using vue-router, how do I go backwards using the declarative way: router-link
and router.go(n)
? I know it's possible like this: <h1 @click="$router.go(-1)"></h1>
, but <router-link :to="$router.go(-1)" tag="h1"></router-link>
won't work because it requires string or object.
Upvotes: 0
Views: 69
Reputation: 6081
There is no way to do this declaratively. See this issue: https://github.com/vuejs/vue-router/issues/880
Upvotes: 1