Surface.Components.LiveRedirect (surface v0.3.0) View Source
Defines a link that will redirect to a new LiveView.
Provides similar capabilities to Phoenix's built-in live_redirect/2
function.
The current LiveView will be shut down and a new one will be mounted
in its place, without reloading the whole page. This can
also be used to remount the same LiveView, in case you want to start
fresh. If you want to navigate to the same LiveView without remounting
it, use <LivePatch>
instead.
Properties
- to :string, required: true - The required path to link to.
- replace :boolean, default: false - The flag to replace the current history or push a new state.
- class :css_class, default: "" - The CSS class for the generated
<a>
element. - label :string - The label for the generated
<a>
alement, if no content (default slot) is provided. . - opts :keyword, default: [] - Additional attributes to add onto the generated element .
Link to this section Summary
Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.
Callback implementation for Phoenix.LiveComponent.update/2
.
Link to this section Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Callback implementation for Phoenix.LiveComponent.render/1
.
Callback implementation for Phoenix.LiveComponent.update/2
.