title: Vue.js Use method in v-for
body: <p>I want to run a method inside a v-for in my Vue component. 
  Example:</p>
  
  <pre><code>&lt;div v-for="(foo,index) in bar"&gt;
        &lt;p&gt;{{myMethod(foo,index)}}&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I do this the p-tag just stays empty. Here is my method(with an axios call):</p>
  
  <pre><code> myMethod:function(foo,index) {
      axios.get('/myAjaxCall')
      .then((response)=&gt; {
          //works perfectly
          alert(response.data);
          return response.data;
  
      })
      .catch(function (error) {
          console.error(error);
      });
     },
   }
  </code></pre>
  
  <p>When I <code>alert( SomethingWithFooAndIndex)</code>, the browser is showing exactly what I need. When I remove the axios call the method seems to work</p>
  
  <p>Thanks!</p>