I have just started Vue.js and what should seen simple enough doesn't work.
I have 2 radio button and depending which one is clicked I want to change a font awesome icon. When I click on Yes i want to add the class fa-fa-check and when I click No, add class fa-fa-times
<div class="form-group">
<div class="col-sm-1">
<i class="fa fa-2x fa-check {{lcb}}"></i>
</div>
<label class="control-label col-sm-5">New Field</label>
<div class="col-sm-3">
<div class="radio">
<label>
<input type="radio" name="test" value="1" v-model="lcb" v-bind:value="check">
<span class="cr"><i class="cr-icon fa fa-circle"></i></span>
Yes
</label>
</div>
</div>
<div class="col-sm-2">
<div class="radio">
<label>
<input type="radio" name="test" value="0" v-model="lcb" v-bind:value="times">
<span class="cr"><i class="cr-icon fa fa-circle"></i></span>
No
</label>
</div>
</div>
</div>
This causes an error
Use of undefined constant lcb - assumed 'lcb'
I've also tried using v-if and v-else but that didn't work either
I don't know if this is the right way to do it
<script>
var app = new Vue({
el: '#app',
data: {
lsb: false,
check: 'fa-check',
times: 'fa-times'
}
});
</script>