Here is how my vue component looks:
<template>
<div>
...
<div class="list-group">
<a :href="baseUrl+'/message/inbox'" class="list-group-item">
Message
</a>
<a :href="baseUrl+'/message/review'" class="list-group-item">
Review
</a>
<a :href="baseUrl+'/message/resolution'" class="list-group-item">
Resolution
</a>
</div>
...
</div>
</template>
<script>
export default {
...
data() {
return {
baseUrl: window.Laravel.baseUrl
}
},
...
}
</script>
After clicking a link and reloading the page, I want to add an 'active' class to that clicked link. However, I am unsure of how to achieve this. Can anyone provide guidance?