2👍
✅
Seems to work fine: https://jsfiddle.net/wostex/63t082p2/47/
But it’s not the best practice if you manipulate DOM manually. It limits your possibilities with reactive properties.
<div id="app">
<child></child>
</div>
new Vue({
el: '#app',
components: {
'child': {
template: `
<div class="row">
<div class="col-md-12">
<div id="hottable"></div>
</div>
</div>`,
mounted() {
let c = document.getElementById('hottable');
console.log(c);
}
}
}
});
Source:stackexchange.com