Home Vue.js: active class for router-link

# Vue.js: active class for router-link

Olga B
1#
Olga B Published in 2018-02-13 12:29:22Z
 I have a sidebar item which is active when I click on it. It is obvious that when I click on a sublink inside a component, my active class switches off. How to prevent this? My sidebar:  My subscriptions  My component (a page which will be opened when we click on the item in the sidebar):   Inside my page you can see its children. In the router.js it looks like this: { path: '/sub', redirect: '/sub/success_tools_subscriptions', }, { path: '/sub', component: MySubscriptionsPage, children: [ { path: 'success_tools_subscriptions', component: MySuccessToolsSubscriptions, }, { path: 'qa_subscriptions', component: MyQaSubscriptions, }, ], }, 
Olga B
2#
Olga B Reply to 2018-02-14 07:13:47Z
 Added active-classes to sublinks under heading h1 as well.
 You need to login account before you can post.
Processed in 0.312461 second(s) , Gzip On .