New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Passing collection to vue.js

Jason Young August 30, 2019 by Jason Young

Let's say i've got a Vue component called "things-slider":

<things-slider></things-slider>


Is there a way to access a collection from a template?

<things-slider :things="{{collection:things}}"></things-slider>


I know I could create a more granular component and use something like:

{{collection:things}}
<thing-slide>{{image}}</thing-slide>
{{/collection:things}}


But I feel like i've got to be missing something obvious here.

Answered by Mykolas Mankevicius!
>>>>>>> Answered <<<<<<<
3 Replies
3 Followers