I’m using AngularJS with my Jekyll site. I would like to add an 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.
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.
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