In my live view template I added this snippet:
<script src="<%= Routes.static_path(@socket, "/js/hi.js") %>"></script>
That produced the following error:
How can I fix this?
In my live view template I added this snippet:
<script src="<%= Routes.static_path(@socket, "/js/hi.js") %>"></script>
That produced the following error:
How can I fix this?
I got it working by replacing
use Phoenix.LiveView
with
use MyAppWeb, :live_view
in watch_live.ex.