title: how to access data from inside a method
body: <p>I'm new to vue.js. I'm starting to migrate my angularjs app.
  I'm using vue cli to generate a new simple-webpack project.
  This creates a new webpack+vueLoader project.
  Everything went smoothly but now I have an issue.
  on my @click event I want to change my data but I can't access the object.
  'this' is not the data instance.</p>
  <p>What am I missing here?</p>
  <pre><code>&lt;template&gt;
      &lt;input type=&quot;radio&quot; name=&quot;account-type&quot; @click=&quot;setAccountType(item.id)&quot;/&gt;&lt;span&gt;{{item.name}}&lt;/span&gt;
  &lt;/template&gt;
  &lt;script&gt;
    export default {
       data() {
          return { accountType: null
       },
       methods: { setAccountType: (typeId) =&gt; this.accountType = typeId
    }
  &lt;/script&gt;
  </code></pre>
  <p>this is not the data instance as expected and thus ui not updated.
  In vuejs doc i can see just addressing this is sufficient while in a method:
  <a href="https://v2.vuejs.org/v2/guide/events.html#Method-Event-Handlers" rel="nofollow noreferrer">vue js doc</a></p>
  <p>Any help is appreciated.</p>
  <p>Kind regards.</p>