Skip to content
New issue

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

how can i use "await locals.fn.call()" #39

Closed
witwave opened this issue Jun 28, 2017 · 2 comments
Closed

how can i use "await locals.fn.call()" #39

witwave opened this issue Jun 28, 2017 · 2 comments

Comments

@witwave
Copy link

witwave commented Jun 28, 2017

Hi, I need such function like the co-ejs
the co-ejs only support koa1.x but I hope use in koa2
I can write code in ejs

 <% user= await locals.user.get(1) %>

thank you

@dead-horse
Copy link
Member

no, it won't be supported by this middleware, please prepare all the datas before rendering.

@witwave
Copy link
Author

witwave commented Jul 1, 2017

ok, thanks @dead-horse
I have it done in ejs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants