title: return data from axios without it being a promise
body: <p>I made a fake api call to my json file with axios. I get a promise back from the function where i can get my data from. but i don't want that. I want to receive the data from the function.</p>
  
  <p>my code now: products.js</p>
  
  <pre class="lang-js prettyprint-override"><code>export default {
      getAllProducts(axios) {
          return axios.get('fakedb.json').then(response =&gt; {
              return response.data;
          });
      }
  }
  </code></pre>
  
  <p>the view file: a product.vue file</p>
  
  <pre class="lang-js prettyprint-override"><code>import productController from '~/data/controllers/product';
  export default {
    data() {
      return {
        products: productController.getAllProducts(this.$axios).then(res =&gt; this.products = res)
      }
    },
  }
  </code></pre>
  
  <p>but this is not what i want to achieve.
  what i want to achieve is this code in my product.vue file:</p>
  
  <pre><code>import productController from '~/data/controllers/product';
  export default {
    data() {
      return {
        products: productController.getAllProducts(this.$axios)
      }
    },
  }
  </code></pre>
  
  <p>i want to receive the data without having to handle the promise in the view file. any solution how to return my data in the products.js file?</p>
  
  <p>if i do a normal return from the products.js file like this it works fine:</p>
  
  <pre><code>export default {
      getAllProducts(axios) {
          return [
            {
                "name": "Product1",
                 "price": 9.75
            },
            {
                "name": "Product2",
                "price": 10.75
            }
          ]
  
      }
  }
  </code></pre>
  
  <p>But i want it to go with axios</p>