or.npm set up -D nuxt-typed-router@legacy.Arrangement.Sign up the element in the nuxt.config.ts, carried out!export default defineNuxtConfig( components: [' nuxt-typed-router'],. ).Instance Use.pages/login. vue.When a path has actually no params specified, the params building will not also be offered as a choice in the router.router.push('/ login/bar')// Inaccuracy!router.push( title: 'login', params: foo: 'pub')// Error!router.push(" https://vuejsfeed.com/login")// Great!router.push( name: 'login')// Great!pages/user/ [id] vue.When an option has actually a needed param defined, getting through precisely to this route will definitely throw an inaccuracy if you do not offer a params building or even if you place a wrong param.router.push( label: 'user-id')// Mistake!router.push( title: 'user-id', params: club: 'baz')// Inaccuracy!router.push('/ customer')// Mistake!const i.d.="ey7878".router.push('/ individual/$ i.d. ')// Great!router.push( name: 'user-id', params: id)// Excellent!router.push('/ user/$ id/ baguette')// Inaccuracy!For addressed paths, the params building will be offered as well as appropriately typed in.const path = useRoute().if (route.name === 'foo') console.log( route.params.baz)// Error!console.log( route.params.foo)// Excellent!