Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically listen for v-on on vuejs

I'm using a filter returning plain HTML in vuejs. And in this HTML there is a v-on tag. How can I make vuejs to parse again HTML to detect new content/events listeners/ etc. ?

Thanks

like image 798
Extaze Avatar asked Nov 21 '25 02:11

Extaze


1 Answers

UPDATE: In Vue 1.0, if you know what components you need to instantiate (versus compiling random HTML), you can also use the parent argument on View Model instantiation: http://vuejs.org/api/#parent


You will need to manually compile that HTML within the View Model using $compile (currently undocumented). See this discussion for more information:

https://github.com/vuejs/Discussion/issues/77

like image 99
David K. Hess Avatar answered Nov 23 '25 15:11

David K. Hess