Skip to content

Commit

Permalink
docs(router): add definition of ctx (#2136)
Browse files Browse the repository at this point in the history
  • Loading branch information
HuangCongQing authored and atian25 committed Feb 28, 2018
1 parent 3e7ef6a commit e0282b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/zh-cn/basics/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = app => {
// app/controller/user.js
class UserController extends Controller {
async info() {
const { ctx } = this;
this.ctx.body = {
name: `hello ${ctx.params.id}`,
};
Expand Down

0 comments on commit e0282b9

Please sign in to comment.