0

Issue:

I am trying to parse an HTML string inside a blade template and then once the blade template is build, it get passed into a slot inside Vue.

example.blade.php

<p>{!! $market['description'] !!}</p>

Example.vue

<div class="d-none d-md-block">
  <slot name="description"></slot>
</div>

Right now, when I click refresh it actually parses the HTML string and displays it correctly. And then once the blade template is injected into the slot in the Vue file, it goes back to an HTML string.

I hope this explanation makes sense. Let me know if you have any questions. Also, edits for the wording of the title are welcome.

Tim Bogdanov
  • 212
  • 5
  • 21
  • It's not clear to me if you are compiling the Vue on the fly or if it's compiled before the blade render. I suggest reading this https://stackoverflow.com/questions/41520258/how-to-pass-a-php-variable-to-vue-component-instance-in-laravel-blade too – Paulo H. Dec 11 '21 at 00:52
  • 1
    This is pretty unclear, but consider using v-html in vue component if you want to show and HTML tag instead of a string: `
    ` instead of `
    {{myString}}
    `
    – Luciano Dec 11 '21 at 01:36

0 Answers0