Skip to content

Instantly share code, notes, and snippets.

@tslim
Created June 6, 2020 09:03
Show Gist options
  • Save tslim/9f4e2b51d85ba80c7b2960330f41401d to your computer and use it in GitHub Desktop.
Save tslim/9f4e2b51d85ba80c7b2960330f41401d to your computer and use it in GitHub Desktop.
defp apply_action(socket, :index, _params) do
assign(socket, :page_title, "Your Page Title")
end
# OR
def handle_params(params, uri, socket) do
{:noreply,
socket
|> assign(:page_title, "You Page Title")
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment