title: How do I pass a URL querystring in Vue?
body: <p>I'm trying to pass a querystring value when I open a view. I have set up my router like this:</p>
  
  <pre><code>import Home from "../views/Home.vue";
  import Summary from "../views/Summary.vue";
  
  Vue.use(VueRouter);
  
  const routes = [
    {
      path: "/",
      name: "home",
      component: Home
    },
    {
      path: "/summary/:id",
      name: "Summary",
      component: Summary
    }
  ];
  </code></pre>
  
  <p>The home.vue has this link:</p>
  
  <pre><code>&lt;a href="#" class="card-link" @click.prevent="goSummary(item.id)"&gt;View Item Summary&lt;/a&gt; &lt;!--item.id came from the v-for loop--&gt;
  </code></pre>
  
  <p>The home.vue has this on the export default script</p>
  
  <pre><code>methods: {
    goSummary(id) {
      //do other things here
      this.$router.replace('Summary/'+id); //I'm supposed to see the view
    }
  }
  </code></pre>