phoenix中 link 链接
1 <.link href={~p"/users/#{user.id}"} method="get">Log in</.link>
1 def show_user(assigns) do 2 ~H""" 3 <.link href={~p"/users/#{@id}"} method="get">View</.link> 4 """ 5 end 6 7 8 <%= for user <- @users do %> 9 <tr> 10 <td><b><%= first_name(user) %></b> (<%= user.id %>)</td> 11 12 <br/> 13 <.show_user id={user.id} /> 14 </tr> 15 <% end %>