[Vuejs]-How to do a function call in HTML with vueJS

0๐Ÿ‘

You can simply do {{ getComments() }} in your markup.

0๐Ÿ‘

I am not sure if this will work, but if you store the comments in vuex, you can use this:

<p>{{ this.$store.state.comments.length }}<p>

This only works if the comments is correctly stored in vuex, I hope this will work for you.

Leave a comment