nuxt2 => $nuxt.$route.path
nuxt3 => const route = useRoute();//needs to be initialized in the setup
nuxt3:
<script setup>
const route = useRoute();
</script>
or
<script>
export default {
setup() {
const route=useRoute();
},
}
</script>
Top comments (0)