show conditional header based on url in vue js 1

show conditional header based on url in vue js


Here is what the above code is Doing:
1. We’re using the v-if directive to conditionally render the navbar and appfooter components.
2. We’re using the $route.name property to get the name of the current route.
3. We’re using the includes() method to check if the current route name is in the array of route names.
4. If the current route name is in the array, the component will not be rendered.

Similar Posts