Is it possible to parse Vue.js data with jQuery? -


i have line of jquery code:

$("#shownames").text("{{ $t('hide_labels') }}"); 

i'd set text of #shownames element value taken vue-i18n instance, dependent on user localization. when it's written way, literal moustache syntax contents. there way values displayed?

you can this:

$("#shownames").text(this.$t('hide_labels')); 

if choose. it's best use vue methods update dom, available if need it.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -