I want to use Vue js inside my WordPress plugin. Here is my html markup:
<div class="wrap" id="vue-app">
<h2>Add counter</h2>
<p>{{ message }}</p>
</div>
and here is my js:
var data = {
message: 'Test message...',
};
new Vue({
el: '#vue-app',
data: data
});
but it's not working! I have checked and both Vue js and my js files are loading correctly. I'm really confused, because when I paste this code inside a HTML file outside WordPress, it works!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire