Reputation: 2684
I have integrated ngx-gallery into my project.
My component now looks like this:
<div class="page-content">
<ngx-gallery [options]="galleryOptions" [images]="galleryImages" fxFlex="70"></ngx-gallery>
<button (click)="updateGallery()">CLICK!</button>
</div>
I am trying to use the following function in order to update my gallery:
updateGallery(): void {
this.galleryImages = this.galleryImagesCache.slice(0, Math.floor(Math.random() * (15 - 1)) + 1);
}
However, it appears once the ngx-gallery component is initialized, it will not update it's contents. Any advice would be greatly appreciated.
Upvotes: 0
Views: 2528
Reputation: 17879
Probably this lib just do setting in OnInit and does not process onChanges. Open an issue on github for this lib.
Upvotes: 2