Hello,
I created an application without HTML (when I started with this application, I didn’t needed it).
Now I would like to HTML, I installed {:phoenix_html, “~> 2.11”}, but got the following error:
Could not render "app.html" for AppWeb.LayoutView, please define a matching clause for render/2 or define a template at "lib/api_web/templates/layout". No templates were compiled for this module. Assigns:
Code:
page_controller.ex:
defmodule AppWeb.PageController do
use AppWeb, :controller
def index(conn, _params) do
render(conn, "index.html")
end
end
layout_view.ex
defmodule AppWeb.LayoutView do
use AppWeb, :view
end