beego学习笔记(4):开发文档阅读(5)

controller的逻辑:git

咱们看下面的代码,就知道怎么传值的:github

import (
        "github.com/astaxie/beego"
)

type MainController struct {
        beego.Controller
}

func (this *MainController) Get() {
        this.Data["Website"] = "beego.me"
        this.Data["Email"] = "astaxie@gmail.com"
        this.TplName = "index.tpl"
}
相关文章
相关标签/搜索