[Vuejs]-VueJS: setInterval method not working properly

0👍

Vue has a life cycle that you can leverage to complete this objective. You can hook into the created function and execute your interval within:

created() {
    this.startInterval()
},

This is not a method. It will be a sibling to your data and method properties.

Leave a comment