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

Pass custom context to commands #327

Open
tartinesKiller opened this issue Feb 3, 2018 · 1 comment
Open

Pass custom context to commands #327

tartinesKiller opened this issue Feb 3, 2018 · 1 comment

Comments

@tartinesKiller
Copy link

After reading the annyang sources, I've seen that the commands are executed in the window context, or in the annyang context.
I've moved all the annyang logic in a separate js file, and my commands contains a method call, this.method();. But actually this is undefined.

Expected Behavior

It should be possible to customize the commands context, like what is already done for callbacks.

Maybe there is already a way of doing this, but I didn't find it.

Keep up with the good work ! :)

@lesliepound
Copy link

What is the status on this? It would be marvelous to attach some context to callback.

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