【发布时间】:2019-01-26 15:58:48
【问题描述】:
我创建了一个带有默认骨架的 revel web 应用程序。
我创建了一个新的路线/动作/视图:
控制器动作:
func (c Ctrl1) Action3() revel.Result {
variable1 := "test1"
variable2 := "test2"
c.Flash.Error("Message")
return c.Render(variable1,variable2)
}
Action3.html:
{{set . "title" "Test"}}
{{template "header.html" .}}
{{template "flash.html" .}}
Hello: {{.variable1}}
{{template "footer.html" .}}
我第一次运行我的 web 应用程序时,我看到了 flash 消息。 但是下次,如果我刷新页面,它就会消失!
我已经重新开始狂欢了
谢谢
【问题讨论】: