<input type="checkbox" \# v-model="checked" \# >
EDIT:
I tried using a double escaped \# like this:
<input type="checkbox" \\# v-model="checked" \# >
But it did not work, when I examined the page via chrome dev tool, this is how the input is displayed:
<input type="checkbox" #="" v-model="checked">
The reason for the v-model is that I am trying to do an 'if conditional' in my Vue.js model
. i.e
<script>
const mixin = {
data: function() {
return {
checked:true
}
created() {
this.checked = this.addGoals();
},
methods: {
addGoals() {
if (test === 3){
return true;
}else{
return false;
}
}
</script>
I did try this method to escape the values but it did not work:
<input type="checkbox" #:v-model="checked">
The error message:
Uncaught Error: Invalid template:'