我正在尝试向链接(Phoenix.HTML.link)添加自定义html
<%= link "<i class=\"fas fa-users\"></i> Login" to: "/login", class: "some class" %>
#But not working, result in this...
#HTML result:
<a class="some class" href="/login"><i class="fas fa-users"></i> Login</a>
功能link具有do... end
块
#Example of use
<%= link to: "url", class: "nav-link" do %>
<i class="fas fa-users"></i> Login
<% end %>
这里是文档:https://hexdocs.pm/phoenix_html/Phoenix.HTML.Link.html
Phoenix.HTML.raw/1