-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
What is the right place to add support for inline templates?
Here is an example:
defmodule AppWeb.ThermostatLive do
use Phoenix.LiveView
def render(assigns) do
~L"""
<div class="widget">
Current temperature: <string><%= @temperature %></strong>
</div>
"""
end
def mount(_params, %{"current_user_id" => user_id}, socket) do
temperature = Thermostat.get_user_reading(user_id)
{:ok, assign(socket, :temperature, temperature)}
end
endIdeally I would like the part inside the sigil to be highlighted as eex html template.
Metadata
Metadata
Assignees
Labels
No labels