Escape VueJS data binding syntax in Laravel Blade?

后端 未结 2 668
日久生厌
日久生厌 2021-02-05 11:36

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?

2条回答
  •  灰色年华
    2021-02-05 11:59

    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:

    @{{ selectedQuestionDesc }} @{{ selectedQuestionDesc }}
    {!! $selectedQuestionDesc !!} {{ $selectedQuestionDesc }}

提交回复
热议问题