VueJS Attach active class to li tag not a tag

  css, javascript, vue.js

Hi I want to make the li have a class of active when the /support route is sent. Out of the box active class only applies tot he router-link aka a tag. Thanks!

<ul>
 <li class="nav-item" >
         
                <router-link  to="/support" class="nav-link d-flex align-items-center justify-content-between">
                  <span>
                    <span class="sidebar-icon"
                      ><span class="fas fa-life-ring"></span
                    ></span>
                    Support
                  </span>
                </router-link>
              </li>
            </ul>

Source: Ask Javascript Questions

LEAVE A COMMENT