title: Vue.js add function to a component
body: <p>I am using Vue.js and I would like to add a function to my component, Map.vue, so when I click the button it calls a function declared in the same file : </p>
  
  <pre><code>&lt;template&gt;
    &lt;div&gt;
      &lt;div class="google-map" :id="mapName"&gt;
      &lt;/div&gt;
      &lt;button &gt;Do stuff&lt;/button&gt;  
    &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <p>I have only seen examples when the function is declared in the App.vue. How do you do that in my Map.vue file ?</p>