Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的实时视图模板中,我添加了这个片段:
<script src="<%= Routes.static_path(@socket, "/js/hi.js") %>"></script>
这产生了以下错误:
我怎样才能解决这个问题?
我通过替换让它工作了
use Phoenix.LiveView
和
use MyAppWeb, :live_view
在 watch_live.ex 中。