Support mixin `@Ctx`
See original GitHub issueexample
// import something
const app = new Koa()
app.use(ctx=>{
ctx.foo = 123
})
class Example {
@Get('/xxx')
foo(@Ctx() ctx) {
console.log(ctx.foo) // why undefined ???
}
}
useKoaServer(app, {
controllers: [Example]
})
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
Add support for mixins · Issue #1041 · sveltejs/svelte - GitHub
Hi everyone! To continue the conversation begun in a chat, I want to suppose my vision of Mixin implementation to Svelte.
Read more >Mixins - The Modern JavaScript Tutorial
JavaScript does not support multiple inheritance, but mixins can be implemented by copying methods into prototype. We can use mixins as a way...
Read more >Defining mixins | LoopBack Documentation
Use mixins to apply common logic to a set of models. For example, a timestamp mixin could inject “created” and “modified” properties to...
Read more >TpPropertiesMixin: telepathy-glib API Reference Manual
TpPropertiesMixin — a mixin implementation of the Telepathy.Properties interface ... An object with the properties mixin. ctx. A properties context.
Read more >moleculerjs/moleculer - Gitter
However, when I call the identity service using ctx.call method the passport mixin is not being invoked! Here is my authorize method.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I also have this problem.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.