c4250872 by asta.xie

controller data inherit the context's data

1 parent 17dd7224
...@@ -76,6 +76,9 @@ func (c *Controller) Init(ctx *context.Context, controllerName, actionName strin ...@@ -76,6 +76,9 @@ func (c *Controller) Init(ctx *context.Context, controllerName, actionName strin
76 c.TplExt = "tpl" 76 c.TplExt = "tpl"
77 c.AppController = app 77 c.AppController = app
78 c.EnableReander = true 78 c.EnableReander = true
79 for k, v := range ctx.Input.Data {
80 c.Data[k] = v
81 }
79 } 82 }
80 83
81 // Prepare runs after Init before request function execution. 84 // Prepare runs after Init before request function execution.
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!