title: Vuejs redirect to url when clicked on a button
body: <p>I have a button on which when I click I want it to redirect to a url that is begin passed in it.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>&lt;template&gt;
  &lt;button type="button" v-on:click="gotosite(modalDetails.final.product_url)"&gt;Buy&lt;/button&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
   .
   ..
   ...
   .....
   methods : {
          gotosite(producturl){
          this.window.location.href = producturl
              }
  
  &lt;/script&gt;
  &lt;style&gt;&lt;/style&gt;
  </code></pre>
  
  <p>When I click on the button it doesnot redirect me to a url.</p>
  
  <p>I am thinking of making the  tag look like button and use it redirect it but how to do it via button.</p>