View Source MoonWeb.Pages.ExamplePage (Moon v2.89.1)
Page for visual/automated screen-shot tests in Moon DS
Properties
id :string, required: true - Both the DOM ID and the ID to uniquely identify a LiveView. An
:id
is automatically generated when rendering root LiveViews but it is a required option when rendering a child LiveView.container :tuple - An optional tuple for the HTML tag and DOM attributes to be used for the LiveView container. For example:
{:li, style: "color: blue;"}
. By default it uses the module definition container.session :map - A map of binary keys with extra session data to be serialized and sent to the client. All session data currently in the connection is automatically available in LiveViews. You can use this option to provide extra data. Remember all session data is serialized and sent to the client, so you should always keep the data in the session to a minimum. For example, instead of storing a User struct, you should store the "user_id" and load the User when the LiveView mounts.
sticky :boolean - An optional flag to maintain the LiveView across live redirects, even if it is nested within another LiveView. If you are rendering the sticky view within your live layout, make sure that the sticky view itself does not use the same layout. You can do so by returning
{:ok, socket, layout: false}
from mount.
Summary
Functions
Callback implementation for Phoenix.LiveView.mount/3
.
Callback implementation for Phoenix.LiveView.render/1
.
Functions
Callback implementation for Phoenix.LiveView.mount/3
.
Callback implementation for Phoenix.LiveView.render/1
.