Could EASILY or more like, simply, do this with component
tag (refer to this vue documentation) with no new Vue
but I wanted to try this with new Vue
... just because.
I thought new Vue({ el: target_el })
would put the Vue component INSIDE the target_el
, but it seems to replace. So, when I want to load compA and compB, when I use the target_el
to load using new Vue(Object.assign(compA, { el: target_el })
or something, the target_el
is gone, so when I want to 'toggle' to compB with new Vue(Object.assign(compB, { el: target_el })
, it just doesn't work.
Also about the vue.config.js
setting, refer to this Vue issue.
Was getting:
[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
(found in <Root>)
and things weren't working. Creating the vue.config.js
file then adding the runtimeCompiler: true
made it work.