Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue 3 route params

<script setup>
import { useRoute } from 'vue-router';

const route = useRoute();  
const id = route.params.id; // read parameter id (it is reactive) 

</script>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vue #route #params
ADD COMMENT
Topic
Name
4+7 =