I notice a difference in using
embed_templates from a controller and an explicit component definition
from a controller and embed_template
- new.html.heex
- sub.html.heex
in new.html.heex with @comps a list of maps
...
<sub comps={@comps}/>
this fails with
lists in Phoenix.HTML and templates may only contain integers representing bytes, binaries or other lists, got invalid entry
if instead
<Component.sub comps={@comps} />
it works as usual, with the exact same component defined in a regular component file
ALSO
how do you alias for embedded templates ? putting the alias in the new view module does not work
defmodule AppWeb.catHTMl do
embed_templates "cat_html/*"
alias AppWeb.MyModule <- does not work for embedded template
end