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"
}
相關文章
相關標籤/搜索