2

I have

.navigation
ul
  li
    router-link(:to="{ name: 'tasks'}") Tasks
  li
    router-link(:to="{ name: 'kanban'}") Kanban
  li
    router-link(:to="{ name: 'activity'}") Activity
  li
    router-link(:to="{ name: 'calendar'}") Calendar
  li
    router-link(:to="{ name: 'files'}") Files
  .marker
  .selecttasks
    span
  .selectkanban
    span
  .selectactivity
    span.third-marker( )
  .selectcalendar
    span.fourth-marker( )
  .selectfiles
    span

How with click on router-link add active class to markers(for example to .selecttasks)?

1 Answer 1

1

For each router link component add the prop active-class like :

 router-link(:to="{ name: 'tasks'}" active-class="selecttasks") Tasks
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.