-
-
Notifications
You must be signed in to change notification settings - Fork 657
Closed
Description
When i use AdonisJS with VueJS, there seems to be some conflict with the mustache {{ }} syntax.
Frameworks like Django have a tag called {% Verbatim %} that can be used to surround conflicting mustache syntax so the template engine does not render that part of the code.
I wish you will add such a feature to Adonis. The below code works fine outside Adonis when published as a .html file. But it does not work in Adonis - the drop down list shows as "undefined".
<html>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
<div id="app">
<form action="/" method="POST">
<select v-model="Selected">
<option v-for="item in test" v-bind:value="item.name" >
{{ item.name }}
</option>
</select>
<input type="submit" value="Submit" class="btn btn-primary">
</form>
</div>
<script>
new Vue({
el: '#app',
data: {
test: [
{ id:1, name:"adam"},
{ id:2, name:"lena"},
{ id:3, name:"hamza"},
],
Selected: "",
},
})
</script>
</body>
</html>
Metadata
Metadata
Assignees
Labels
No labels