You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My app init after some async changes (my main.js): (async function () { try { let response = await fetch('/config.json'); let config = await response.json(); window.appConfig = config; appInit(); } catch (error) { alert('appConfig not found!') window.stop(); } })();
and inside appInit() i use new Vue({ el: '#app', render: h => h(App), router, i18n, store })
But i have some texts inside .js file and now i use like this:
export default { super_name: 'Super name' }
My question: how can i use inside .js file dynamic $i18n texts? I can't export new Vue, because it is inside function appInit()
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My app init after some async changes (my
main.js
):(async function () { try { let response = await fetch('/config.json'); let config = await response.json(); window.appConfig = config; appInit(); } catch (error) { alert('appConfig not found!') window.stop(); } })();
and inside appInit() i use
new Vue({ el: '#app', render: h => h(App), router, i18n, store })
But i have some texts inside .js file and now i use like this:
export default { super_name: 'Super name' }
My question: how can i use inside .js file dynamic $i18n texts? I can't
export new Vue
, because it is inside function appInit()Beta Was this translation helpful? Give feedback.
All reactions