0๐
โ
$route.path()
returns only the resolved absolute path, so: localhost:8080/lp/
and localhost:8080/lp/#/page1
, will be both return as /lp/
.
It looks like $route.fullPath()
is what you need. fullPath()
will return the resolved URL as well as the query and hash. So if you really are on the home page (/lp
and not /lp/#/page1
) it will only return /lp
.
You could do something like:
<a class="list-group-item" v-link="{ path: '/' }" v-if="$route.fullPath !== '/lp'">Home</a>
Source:stackexchange.com