Ghigo Ghigo - 1 year ago 141
Javascript Question

DOM element to corresponding vue.js component

How can I find the vue.js component corresponding to a DOM element?

If I have

element = document.getElementById(id);

Is there a vue method equivalent to the jQuery

Answer Source

The proper way to do with would be to use the v-el directive to give it a reference. Then you can do this.$$[reference].

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download