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 to add es6 classes logic in methods section? #3151

Closed
6pm opened this issue Jun 24, 2016 · 3 comments
Closed

How to add es6 classes logic in methods section? #3151

6pm opened this issue Jun 24, 2016 · 3 comments

Comments

@6pm
Copy link

6pm commented Jun 24, 2016

In vue.js all methods united in methods: {...} section. It uneasily when we have more methods in one component. How to divide methods and implements in es6 classes, as in this example - https://jsfiddle.net/slavik_210/9a5waya2/

@fnlctrl
Copy link
Member

fnlctrl commented Jun 24, 2016

1.ES6 Classes are unnecessary here.
2.If your goal is to divide methods, you can simply put them in a separate file

import {foo, bar} from 'some-other-file'
...
methods: {
   foo,
   bar
}

@phanan
Copy link
Member

phanan commented Jun 24, 2016

Besides, please use forum and/or Gitter for such questions.

@phanan phanan closed this as completed Jun 24, 2016
@6pm
Copy link
Author

6pm commented Jun 24, 2016

phanan, thank you! I wrote this questions in gitter but bobody answer.

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

3 participants