xtemplate / xtpl

nodejs wrapper around xtemplate engine (easier for expressjs and koajs)
MIT License
100 stars 25 forks source link

support koa ctx.state #10

Closed imsobear closed 9 years ago

imsobear commented 9 years ago

koa 文档:

ctx.state

The recommended namespace for passing information through middleware and to your frontend views.

类似 express 的 locals, 可以在 view 里直接使用的变量,如 user, 而无需每次 render 的时候都需要传入。

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 76.19% when pulling 764b407509a2840283a57337e79a959019597792 on imsobear:master into c039a84895db81b510a6d6a9439955a42109d9aa on xtemplate:master.

yiminghe commented 9 years ago

@dead-horse

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 76.19% when pulling 176fe8c2d82e889a46064ff9287c3a57129451f1 on imsobear:master into c039a84895db81b510a6d6a9439955a42109d9aa on xtemplate:master.

imsobear commented 9 years ago

不要在意测试用例的端口号从 9000 -> 4001 了,逃~~~

dead-horse commented 9 years ago

没权限,@yiminghe 发布一下吧

yiminghe commented 9 years ago

done. 权限加了