# Using ng-repeat with Jekyll data files

**URL:** <https://talk.jekyllrb.com/t/using-ng-repeat-with-jekyll-data-files/451>\
**Category:** Help\
**Created:** [April 18, 2017, 9:25am UTC](https://talk.jekyllrb.com/t/using-ng-repeat-with-jekyll-data-files/451 "2017-04-18T09:25:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![iloveip](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/iloveip/32/1038_2.png) [@iloveip](https://talk.jekyllrb.com/u/iloveip)\
**Post date:** [April 18, 2017, 9:25am UTC](https://talk.jekyllrb.com/t/using-ng-repeat-with-jekyll-data-files/451/1 "2017-04-18T09:25:37Z")

</div>

Hi there,

I’m using AngularJS with my Jekyll site. I would like to add an [accordion](https://github.com/LukaszWatroba/v-accordion), which works ng-repeat. I know, I can add data in a script tag for ng-repeat, but is there any way to place this data in Jekyll data files?

Or maybe there are some other solutions?

I would really appreciate your help.

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [April 18, 2017, 4:06pm UTC](https://talk.jekyllrb.com/t/using-ng-repeat-with-jekyll-data-files/451/2 "2017-04-18T16:06:03Z")

</div>

not 100% sure what you are asking, but when I use something like this I keep all the info in a data file and then loop thru it to build out the html as it can get complex - so much easier to manage when the content is in a data file. Assuming you need to build the data into a script file I don’t see why the same thing would not work, but I am not an angular user.

Here is an example of a simple js expandable div - at the bottom is a link to the repo where you can see the data file used.

[https://rdyar.github.io/collapsible-panels/](https://rdyar.github.io/collapsible-panels/)

---

<div class="post-metadata">

**Author:** ![iloveip](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/iloveip/32/1038_2.png) [@iloveip](https://talk.jekyllrb.com/u/iloveip)\
**Post date:** [April 20, 2017, 9:02am UTC](https://talk.jekyllrb.com/t/using-ng-repeat-with-jekyll-data-files/451/3 "2017-04-20T09:02:47Z")

</div>

Hi there,

Thank you very much for your reply and the link.

I ended up with something similar. I have all the data in a separate JSON file and then build it into a script file with `$http.get`.
