Answer the question
In order to leave comments, you need to log in
Why does Vue regenerate el?
I'm trying to render either Backbone View or Vue into the same div. Switch components dynamically. Such are the “difficulties of the transition period” - you have to deal with both technologies in one project for some time.
It turns out that Vue re-creates the element assigned to it:
var el = document.getElementById('app');
// ...
new Vue({el: '#app'});
el === document.getElementById('app') // false
Unlike in Vue 1.x, the mounted element will be replaced with Vue-generated DOM in all cases.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question