0👍
I expected an event to fire. Something like turbolinks:load. But this is an XHR-Request where this kind of stuff doesnt happen.
From:
document.addEventListener(turbolinks:load => ({
const productAsset = new Vue({
el: '#product_asset_form',
store,
railsI18n,
productAssetRoutes,
render: h => h(ProductAsset, { props: { ...root_element.dataset } }),
}).$mount()
)}
To:
const productAsset = new Vue({
el: '#product_asset_form',
store,
// this is vue-i18n magic...
i18n: railsI18n,
productAssetRoutes,
render: h => h(ProductAsset, { props: { ...root_element.dataset } }),
}).$mount()
And now it fires immediatly
- [Vuejs]-Use Vue on top of an existing static website to add filtering functionality
- [Vuejs]-How update the vue template at the run-time?
Source:stackexchange.com