Laravel templating language Blade and VueJS data binding syntax are very similar.
How can I escape VueJS data binding syntax when in a *.blade.php
file?
Example:
<div>
<!-- Want it with VueJS -->
{{ selectedQuestionDesc }}
</div>
<div>
<!-- Want it with Laravel Blade -->
{{ $selectedQuestionDesc }}
</div>
While asking the question I discovered that you can escape Laravel's Blade by prepending an
@
sign before the double brackets{{}}
or the{!! !!}
html rendering brackets.So here is the answer:
In order to output real HTML, you will need to use the v-html directive: