-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Make use of Vue more universal #2318
Conversation
LGTM |
How would you handle multiple places of Vue components in single page. Probably change to class vue-app and loop throu them and create Vue for each of them would be better? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment
@lafriks I think we should use only 1 Vue instance on page and we can use any number of components (globally registered) inside. If your logic is inside component, we don't need more instances of Vue. Just set |
Than probably just set I'd id=app globally to body element |
As for webpack I think there was already issue for that or at least it was talked somewhere that it should be used |
@lafriks Yes, |
@Morlinest I already have PR for other component so if you would add Vue app to body I could change my PR to use that |
@lafriks I've found I can't do it right now because my template is included in |
If #2317 will be merged and we add language data as resource, than we can add template to js in |
ok, let's leave like it is currently. Later in 1.3 we can do more refactoring |
LGTM |
Init Vue on any page where exists element with
id="app"
. Don't need to createnew Vue()
for each page. Vue components should be used for logic.