I want to understand, what is the difference between
const Route = useRoute()
and
const Router = useRouter()
in Nuxt3/Vue.
Also, I am not able to use router properly.
on submit, I want to push to another page with query strings using.
<template>
<button @click="SearchTaxi"></button>
</template>
<script setup>
import { ref } from 'vue'
const router = useRouter()
const pickuppoint = ref('')
const dropoffpoint = ref('')
const SearchTaxi = () => {
router.push({
path: `/airport-transfers/results?pickuppoint=${pickuppoint.value}&dropoffpoint=${dropoffpoint.value}`})
}
</script>
I expect route to change to
"url/airport-transfers/results?pickuppoint=XXXX&dropoffpoint=XXXX"
but i am getting
"url/airport-transfers/results"