title: How to redirect in Vue.js to different url when clicked?
body: <p>I'm making a post board with Vue.js and trying to make the page redirected when each post is clicked. </p>
  
  <p>I've installed vue-route and axios. </p>
  
  <p>In index.js,</p>
  
  <pre><code>export default new Router({
    route: [
      {
        path: '/',
        name: 'Post',
        component: Post
      },
      {
        path: '/:req_no',
        name: 'Detail',
        component: Detail
      },
    ]
  })
  </code></pre>
  
  <p>In post.vue</p>
  
  <pre><code>&lt;div @click="detailPost(post.no)"&gt;{{post.title}}&lt;/div&gt;
  
  .
  .
  .
  
  detailPost(req_no) {
      this.$router.push({
      path: `https://dataURL/detail.php/${req_no}`
          })
        }
  </code></pre>
  
  <p>In Detail.vue</p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
          {{contents}}
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
  import axios from 'axios';
  export default {
      name: 'Datail',
      data() {
          return {
              req_no: this.$route.params.req_no,
              contents: {}
          }
      },
      created() {
        axios.get('https://dataURL/detail.php/', {
          params: {
            req_no: this.req_no
          }
        }).then(res =&gt; {
            this.contents = this.res.data
        });
      }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm not sure where to put the url (in the function in post.Vue, detailPost() or in Detail.vue) </p>
  
  <p>If I put it in the function, I get 
  <code>http://localhost:8080/#/http://dataURL/detail.php/2</code></p>
  
  <p>The API guide says I must use the params.</p>
  
  <p>Could you please help me where to fix? Thanks alot!!</p>