I’m trying to write link tag to next page xxx_path
in phoenix template.
<%= link to: xxx_path(@conn, :main, id) do %>
<% end %>
However I have following error.
** (CompileError) lib/xxx_web/templates/layout/header.html.eex:5: undefined function xxx_path/3
I tell you the phx.routes
C:\Works>mix phx.routes
xxx_path GET / xxxWeb.XxxController :index
xxx_path GET /:id xxxWeb.XxxController :main
What is wrong?
Thanks.