All my code is here:
https://stackblitz.com/edit/angular-devextrem-gallery?file=src/app/app.component.html
I need to share gallery in deep nested loop. Problem is probably dataSource array. Above code you can see how to print images in loop but i need to share same in galerry using dev extreme gallery. I am open minded if you recommend me whatever solution here but only using gallery...
Here's the solution. Instead of a single Array of datasource have training id specific array by a map. so basically change your html to :-
then change your datasource from an array to map like below :-
then change your ngInit code to :-
Working Stackblitz
https://stackblitz.com/edit/angular-devextrem-gallery-92fa1f?file=src/app/app.component.ts