Mastering Vue. js by bin Uzayr Sufyan;

Mastering Vue. js by bin Uzayr Sufyan;

Author:bin Uzayr, Sufyan;
Language: eng
Format: epub
Publisher: Taylor & Francis Group
Published: 2022-09-02T00:00:00+00:00


active-class

When the router link is active, the active class that is added is router-link-active by default. We may override the class by setting it as seen in the following code.

<style> ._active{ background-color : black; } </style> <p> <router-link v-bind:to = "{ path: '/route1'}" active-class = "_active">Router Link 1</router-link> <router-link v-bind:to = "{ path: '/route2'}" tag = "span">Router Link 2</router-link> </p>

The class used is active_class =“_active”. This is output displayed in the browser.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.