Merge pull request #115 from Xuyuanp/master
笔误
Showing
2 changed files
with
2 additions
and
2 deletions
| ... | @@ -338,7 +338,7 @@ To disable auto-render in `main.go`(before you call `beego.Run()` to run the app | ... | @@ -338,7 +338,7 @@ To disable auto-render in `main.go`(before you call `beego.Run()` to run the app |
| 338 | 338 | ||
| 339 | You can use `this.Data` in controller methods to access the data in templates. Suppose you want to get content of `{{.Content}}`, you can use following code to do this: | 339 | You can use `this.Data` in controller methods to access the data in templates. Suppose you want to get content of `{{.Content}}`, you can use following code to do this: |
| 340 | 340 | ||
| 341 | this.Data["Context"] = "value" | 341 | this.Data["Content"] = "value" |
| 342 | 342 | ||
| 343 | 343 | ||
| 344 | ### Template name | 344 | ### Template name | ... | ... |
| ... | @@ -405,7 +405,7 @@ main.go文件中设置如下: | ... | @@ -405,7 +405,7 @@ main.go文件中设置如下: |
| 405 | 405 | ||
| 406 | 模板中的数据是通过在Controller中`this.Data`获取的,所以如果你想在模板中获取内容`{{.Content}}`,那么你需要在Controller中如下设置: | 406 | 模板中的数据是通过在Controller中`this.Data`获取的,所以如果你想在模板中获取内容`{{.Content}}`,那么你需要在Controller中如下设置: |
| 407 | 407 | ||
| 408 | this.Data["Context"] = "value" | 408 | this.Data["Content"] = "value" |
| 409 | 409 | ||
| 410 | 410 | ||
| 411 | ### 模板名称 | 411 | ### 模板名称 | ... | ... |
-
Please register or sign in to post a comment