3 ms·
To be a little more concrete, here's an example: <%= live_patch "about", to: Routes.about_path(@socket, :index) %> which creates: <a href="/about" data-p
by sodapopcan 5y ago
To be a little more concrete, here's an example:
<%= live_patch "about", to: Routes.about_path(@socket, :index) %>
which creates:
<a href="/about" data-phx-link="patch" data-phx-link-state="push">about</a>
The data attributes are read by the LiveView HTML and are otherwise ignored by a JSless broswer.
Edited to fix glaring code sample error.