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.
- [Vuejs]-Display data set based on string content using vuejs
- [Vuejs]-How to get data and methods from onther componenet
Source:stackexchange.com