We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好廖老师 关于你的view-koa项目 不太明白为什么在templating.js中这样写
function templating(path, opts) { var env = createEnv(path, opts); return async (ctx, next) => { ctx.render = function (view, model) { ctx.response.body = env.render(view, Object.assign({}, ctx.state || {}, model || {})); ctx.response.type = 'text/html'; }; await next(); }; }
请问这段代码是怎么使controller里面的ctx添加render()函数的?
The text was updated successfully, but these errors were encountered:
有问题去网站提问
Sorry, something went wrong.
No branches or pull requests
你好廖老师
关于你的view-koa项目
不太明白为什么在templating.js中这样写
function templating(path, opts) { var env = createEnv(path, opts); return async (ctx, next) => { ctx.render = function (view, model) { ctx.response.body = env.render(view, Object.assign({}, ctx.state || {}, model || {})); ctx.response.type = 'text/html'; }; await next(); }; }
请问这段代码是怎么使controller里面的ctx添加render()函数的?
The text was updated successfully, but these errors were encountered: