VueJS Attach active class to li tag not a tag

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>


Read more here: https://stackoverflow.com/questions/67009313/vuejs-attach-active-class-to-li-tag-not-a-tag

Content Attribution

This content was originally published by atx123n at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: