title: Vue.js data: undefined
body: <p>I am new to Vue.js. </p>
  
  <p>Please advice me.<br>
  I get <strong>comments: undefined</strong> so comments are not displaying.
  xhr is normal with 200.</p>
  
  <p>Thank you
  Thank you
  Thank you
  Thank you
  Thank you</p>
  
  <pre><code>&lt;template&gt;
   &lt;div&gt;
    &lt;ul class="media-list"&gt;
       &lt;li class="media" v-for="comment in comments"&gt;
           {{ $comment.body }}            
       &lt;/li&gt;
    &lt;/ul&gt; 
  &lt;/div&gt;
  &lt;/template&gt;
  
  
  &lt;script&gt;
   export default {
      data () {
          return {
              comments: []
          }
      },
      props: {
          postid: null
      },
      methods: {
          getComments () {
              this.$http.get('/blog/' + this.postid + '/comments').then((response) =&gt; {
                  this.comments = response.json().data;
              });
          }
      },
      mounted () {
          this.getComments();
      }
  }
  </code></pre>