I was using **router-link-active** class to highlight the active link in menu but even when other links are clicked, the home link with newly clicked menu link ,both, show active state. So i just hurried to official example and updated the path: '/foo' to path: '/' and noticed the same problem. Active state works fine with other route paths i.e. '/home', '/foo', '/user' but always remains active for path: '/' even when it is inactive
http://router.vuejs.org/en/api/router-link.html
Read about the exact option.
this fix it
<!-- this link will only be active at / -->
<router-link to="/" exact>
Most helpful comment
http://router.vuejs.org/en/api/router-link.html
Read about the
exactoption.