Vue.js version
2.6.3
`Modal.vue
<script>
export default {
mounted () {
document.getElementById('app').appendChild(this.$el)
}
}
</script>
Something.vue
Some text here
Show modal
<script>
import Modal from './ui/Modal'
export default {
data: function () {
return {
showModal: false
}
},
components: {
Modal
}
}
</script>`
What is Expected?
When click on the close button, it should close the modal window.
What is actually happening?
Console shows me the error DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.