Closed jeffreyguenther closed 6 years ago
I’m not sure what you mean? When you call Vue.use() it sets up the plugin for all vue apps.
On Thu, Nov 9, 2017 at 11:46 AM Jeffrey Guenther notifications@github.com wrote:
In the readme, we write:
import TurbolinksAdapter from 'vue-turbolinks' Vue.use(TurbolinksAdapter)
export default { data: function () { return { message: new Date } } }
@excid3 https://github.com/excid3 I don't believe this works. There is no reference to Vue in app.vue, or any single file components. I think the lines to set up the mixin need to be added in the place where you call new Vue(...). Or am I missing something?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jeffreyguenther/vue-turbolinks/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEGFdZnCO4tHQZAG4shMozkAAmwuC-yks5s0zqIgaJpZM4QYX_q .
-- Chris Oliver http://excid3.com | @excid3 http://twitter.com/excid3 | http://github.com/excid3
If the Vue
object is defined, it does. In a single file component, the variable Vue
is not in scope.
Ah yeah. Well TurbolinksAdapter should only be included once globally, not inside a single file component.
Ya, that's what I'm getting it at. The README is not clear about this. I just wanted to make sure I wasn't missing something that you knew. I'm going to update that section to make it easier to get started. I've been using Vue more lately, so I can write a more informed guide.
Good call. I hadn't noticed.
Both of those first examples can probably just be condensed into one to include it once globally.
In the readme, we write:
@excid3 I don't believe this works. There is no reference to
Vue
inapp.vue
, or any single file components. I think the lines to set up the mixin need to be added in the place where you callnew Vue(...)
. Or am I missing something?