Difference between revisions of "Vuelinksnip"

From rbachwiki
Jump to navigation Jump to search
(Created page with "<pre> // this is in the route.js file { path: 'user/:id', component: User}, // to get the info <template> <p>Loaded ID:{{id}}</p> </template> <script> export default { data(...")
(No difference)

Revision as of 23:47, 17 October 2018

// this is in the route.js file
{ path: 'user/:id', component: User},

// to get the info
<template>
<p>Loaded ID:{{id}}</p>
</template>

<script>
export default {
data(){
  return{
    id: this.$route.params.id
  }
}
</script>


VueJs Routing