Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

https://github.com/nuxt/nuxt.js/issues/8315#:~:text=%3Chtml%20lang%3D%22ru%22%20data%2Dn%2Dhead%3D%22%257B%2522lang%2522%3A%257B%2522ssr%2522%3A%2522ru%2522%257D%257D%22%3E

<!-- literal string -->
<router-link to="home">Home</router-link>
<!-- renders to -->
<a href="home">Home</a>

<!-- javascript expression using `v-bind` -->
<router-link v-bind:to="'home'">Home</router-link>

<!-- Omitting `v-bind` is fine, just as binding any other prop -->
<router-link :to="'home'">Home</router-link>

<!-- same as above -->
<router-link :to="{ path: 'home' }">Home</router-link>

<!-- named route -->
<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>

<!-- with query, resulting in `/register?plan=private` -->
<router-link :to="{ path: 'register', query: { plan: 'private' }}"
  >Register</router-link
>
Source by router.vuejs.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
7+2 =