Having an issue with dynamically creating the TAG "galeriaimages" in Vue. Although Vue is functioning properly, the props always seem to be undefined.
Thank you for any help.
Main.js
import Vue from 'vue'
import Gi from './components/galeriaimages.vue'
import vuetify from './plugins/vuetify';
Vue.config.productionTip = false
document.addEventListener('DOMContentLoaded', function() {
new Vue({vuetify, render: h => h(Gi) }).$mount('galeriaimages');
});
HTML
<galeriaimages p1="awesome" /> <!-- Dynamically created -->
Vue Component
<script>
export default {
props: ['p1'] ,
data: function() {
return {
}
},
created: function() {
alert(this.p1); //this is always undefined
}
}
A special thanks to @skirtle for providing the solution :-)
I resolved the issue by adding this line in my vue.config.js
runtimeCompiler: true
...and everything is now working perfectly