Submitted by Andrew on Tue, 07/18/2017 - 10:02

How do you load an initial value from Drupal, then let Vue take control from there?

How can I have multiple copies of the Vue app on the page, like for a field formatter?
Do I make one big app, with multiple items in it?
This mentions something similar, and suggests making components: https://laracasts.com/discuss/channels/vue/new-vue-instance-for-every-c…
https://vuejs.org/v2/guide/components.html
I may have to learn webpack to do this right.
Elixer looks like a good framework for that: https://laravel.com/docs/5.3/elixir
PDB has a pull request that includes an example that instantiates multiple apps: https://github.com/mrjmd/pdb/pull/101/files#diff-1bc5379c8afcec87fd100c…

 

 

How can you prevent multiple modules from creating vue apps?