We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My current singleton pattern is to Vue.extend the component and call $appendTo(body) on compile on the first require and return the vm on all others.
Vue.extend
$appendTo(body)
compile
require
vm
When vm.$appendTo will be removed, I will need another way of creating singleton components.. Maybe something like this:
vm.$appendTo
replace: false el: => document.body
In vue-comps I have currently 3 singleton components:
waves
The text was updated successfully, but these errors were encountered:
I don't quite understand the need for $appendTo() here - you can just use native DOM methods on this.$el, what's the difference?
$appendTo()
this.$el
Sorry, something went wrong.
Maybe I'm just confused about
attached deprecated, components no longer have possibility to be off-dom
Will this work?
Comp = Vue.extend(someComp) vm = new Comp() # vm is off-dom here ? document.body.appendChild(vm.$el)
if so, this can be closed..
You need to call $mount() without arguments (which creates vm.$el) before appending it, but otherwise yes it should work.
$mount()
vm.$el
No branches or pull requests
My current singleton pattern is to
Vue.extend
the component and call$appendTo(body)
oncompile
on the firstrequire
and return thevm
on all others.When
vm.$appendTo
will be removed, I will need another way of creating singleton components..Maybe something like this:
In vue-comps I have currently 3 singleton components:
waves
instances with the svg animationsThe text was updated successfully, but these errors were encountered: