elixir - How to Render Raw JavaScript Data in Phoenix Framework -
i got list in controller:
data = ["one", "two"]
i love render in eex template as:
<script> var data = ["one", "two"] </script>
how can make it, tried var data = <%= raw(@data) %>
, got var data = [one, two]
.
Comments
Post a Comment