Current section

Files

Jump to
mdex examples live_view.html
Raw

examples/live_view.html

<h1>Phoenix LiveView Example</h1>
<p>Convert this markdown into a <a href="https://hexdocs.pm/phoenix_live_view/Phoenix.LiveView.Rendered.html">Phoenix.LiveView.Rendered</a> struct.</p>
<h2>Examples</h2>
<p>Starting with a <.link href="/">regular anchor link with static href value</.link>
or one that's parsed with <code>URI.parse/1</code> as <.link href={URI.parse("https://elixir-lang.org")}>Link to elixir-lang.org</.link></p>
<p>Now an example with <code>:navigate</code>:</p>
<p><.link navigate={~p"/?sort=asc"} replace={false}>
Sort By Price
</.link></p>
<p>And finally a <code>:patch</code> with an assign:</p>
<p><.link patch={@path}>Link to @path</.link></p>