Current section

Files

Jump to
phoenix priv template web view.ex
Raw

priv/template/web/view.ex

defmodule <%= application_module %>.View do
use Phoenix.View, root: "web/templates"
# The quoted expression returned by this block is applied
# to this module and all other views that use this module.
using do
quote do
# Import common functionality
import <%= application_module %>.Router.Helpers
# Use Phoenix.HTML to import all HTML functions (forms, tags, etc)
use Phoenix.HTML
# Common aliases
alias Phoenix.Controller.Flash
end
end
# Functions defined here are available to all other views/templates
end