C
C
colorkid2017-04-30 09:35:11
JavaScript
colorkid, 2017-04-30 09:35:11

How to run a function in VUE JS default component?

Hello. Such a thing. I needed to run the default VUE component function. THOSE. It is necessary for me that at loading of the given component (read page), its function was executed. Here is an example https://jsfiddle.net/hpr5b9ch/. There is a myFunction function in the buttons component, how to run it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Khokhlov, 2017-04-30
@colorkid

Use lifecycle hooks: https://ru.vuejs.org/v2/api/#beforeCreate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question