#AlpineJS data in a blade view

3 messages · Page 1 of 1 (latest)

trim raptor
#

Doing something like...

<div x-data="{ loading: false, items: {{ $items }} }"></div>

... works, but characters like - (en dash) show up like &#8211;.

How do I fix this? Using {!! $items !!}} or @json($items) did not fix it.

#

It seemed a bit further away then I thought; using html_entity_decode did the trick.

zenith estuary