app.html.eex 布局在 Phoenix 中指定在哪里?
Where is app.html.eex layout specified in Phoenix?
默认的 Phoenix 项目有 app.html.eex
和 root.html.leex
。在路由文件中,我看到 plug :put_root_layout, {RoveWeb.LayoutView, :root}
指定了根布局。但是,我没有看到 app.html.eex
布局有任何相似之处。是否在任何地方明确定义,或者是否有 Phoenix 默认值自动将 app.html.eex
呈现为布局?
是的,app.html.eex 是您不使用 LiveView 时的默认应用程序布局。
更多信息here
默认的 Phoenix 项目有 app.html.eex
和 root.html.leex
。在路由文件中,我看到 plug :put_root_layout, {RoveWeb.LayoutView, :root}
指定了根布局。但是,我没有看到 app.html.eex
布局有任何相似之处。是否在任何地方明确定义,或者是否有 Phoenix 默认值自动将 app.html.eex
呈现为布局?
是的,app.html.eex 是您不使用 LiveView 时的默认应用程序布局。
更多信息here