[Vuejs]-How can I call a component with data property different? (vue.js 2)

0👍

I think you are saying that the data isn’t there when it is first rendered. If that is the case, mounted is only called after the $el has already been populated, so you should move the dispatch to a lifecyle event that is before the initial rendering. Your best option is beforeCreate

Check out the fully lifecycle here. https://v2.vuejs.org/v2/guide/instance.html

Leave a comment