Hey team,
I can’t for the life of me get link
to generate some HTML.
I posted my question here too:
Thanks
Andrew
Hey team,
I can’t for the life of me get link
to generate some HTML.
I posted my question here too:
Thanks
Andrew
Hey Andrew, your stack overflow post is missing a lot key info necessary to understand and answer your question. What version of phoenix are you using? How did you make your project, and what version of the Phoenix generator was in use at that time?
Thanks for the reply Ben.
I managed to get it working.
GPT was telling me to use an outdated syntax: <%= link to: "/numbers/#{number.id}/messages", class: "block w-full h-full" do %>
I’m using Phoenix v1.7.14, and as of 2024-10-15, the correct way to generate a link in heex is:
<.link href={~p"/numbers/#{number.id}/messages"} class="block w-full h-full">Go</.link>