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

Methods are not bound to the Vue instance #5

Closed
strantr opened this issue Mar 8, 2017 · 0 comments
Closed

Methods are not bound to the Vue instance #5

strantr opened this issue Mar 8, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@strantr
Copy link
Owner

strantr commented Mar 8, 2017

Methods are not being bound to the Vue instance on callbacks from events:

@Component({
    template: "<button @click="test">click</button>
}) class Test {
   public test() {
     console.log(this); // null on click
   }
}

This appears to be because methods are not being copied into the $options object.

@strantr strantr self-assigned this Mar 8, 2017
@strantr strantr added the bug label Mar 8, 2017
@strantr strantr added this to the 2.0.0 milestone Mar 8, 2017
@strantr strantr changed the title Methods are not bound to the Vue instance from Methods are not bound to the Vue instance Mar 8, 2017
strantr added a commit that referenced this issue Mar 8, 2017
@strantr strantr closed this as completed Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant