title: Using event modifier .prevent in Vue to submit form without redirection
body: <p>I'm using Vue in my application and I would like to know how to submit a form but avoid redirection.
  According to the official Vue doc it can be achieved in the following way:</p>
  
  <pre><code>&lt;!-- the submit event will no longer reload the page --&gt;
  &lt;form v-on:submit.prevent="onSubmit"&gt;&lt;/form&gt;
  </code></pre>
  
  <p>Here is my part of my form:</p>
  
  <pre><code>&lt;form class="myForm" action="/page" method="post" @submit.prevent="onSubmit"&gt;
      &lt;input name="email" type="email" placeholder="e-mail" v-model="email"&gt;
      &lt;button @click="myFunction()"&gt;
  </code></pre>
  
  <p>It sorta works in the sense that the page is no longer redirected but I get an error saying that <code>onSubmit</code> method is not defined. So What I don't understand is how I should define it. On the other hand I could just write <code>@submit@prevent</code> but as far as I understand it completely prevents submission and that's not what I'm looking for. 
  Is there a proper way to do this without ajax, axios and that sort of technologies?
  What I want is myFunction to execute and form to submit but I would want to avoid redirection.</p>