S
S
Spoon in the brain2019-12-07 18:03:26
Vue.js
Spoon in the brain, 2019-12-07 18:03:26

How to hide an element from the router and all nested children?

Hello!
There was a small problem, I can’t hide the element from the router, I do this , but this router has children, that is , so I need to hide the element from this router completely, including all its children, how to implement this? this.$route.path != '/tralalala'/tralalala/lalala

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2019-12-07
@By_Engine

You need to use named routes

M
mihozfe, 2020-12-02
@mihozfe

JS work with strings:
this.$route.path.indexOf('/tralalala') === -1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question