title: TypeError: Cannot read property 'get' of undefined vue js
body: <p>I'm having a hard time trying to understand vue.js. I'm currently trying to figure out how I can fetch or call the API. I've managed to setup my <code>index.html</code> <code>app.js</code> can also the packages that are include in the <code>node_modules</code>.</p>
  
  <p>When I try to run my file I'm getting <code>TypeError: Cannot read property 'get' of undefined</code> on my console. It says that I need to install vue-resource and add the two lines of code below. </p>
  
  <p>Where do I insert them exactly? Is it inside my app.js? Sorry for my ignorance but I'm still new to Javascript and Vue.js</p>
  
  <pre><code>var Vue = require('vue');
  Vue.use(require('vue-resource'));
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width,initial-scale=1.0"&gt;
      &lt;script src="https://unpkg.com/vue" &gt;&lt;/script&gt;
  
      &lt;title&gt;article-app&lt;/title&gt;
    &lt;/head&gt;
  
    &lt;body&gt;
      &lt;div id="vue-app"&gt;
        {{ articles }}
      &lt;/div&gt;
  
      &lt;script src="app.js"&gt;&lt;/script&gt;
      &lt;script src="main.js" &gt;&lt;/script&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>var article = new Vue({
      el: '#vue-app',
  
      data: {
          articles: ''
      },
  
      created: function () {
          this.fetchData();
      },        
  
      methods: {
          fetchData: function () {
              var that = this
              this.$http.get('http://localhost/aim-beta/rest/export/json/article'),
                  function (data) {
                      this.articles = data.main.temp;
                  }
          }
      }
  
  });
  </code></pre>