we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "show conditional header based on url in vue js"
Juan Martín
01 Jul 2016
1<template>
2    <div id="app">
3
4/* Note that this takes an array of route names, so you can simply pass in
5the name of the route you don't want this component to be displayed on */
6
7        <navbar v-if="!['login', 'register', 'help'].includes($route.name)" />
8    
9        <main>
10            <router-view />
11        </main>
12    
13        <appfooter v-if="!['login', 'register'].includes($route.name)"/>
14    
15    </div>
16    </template>
17