ngx-gallery icon indicating copy to clipboard operation
ngx-gallery copied to clipboard

gallary show images only when hover or focus on it first time.

Open frndxyz opened this issue 4 years ago • 4 comments

i am using ngx-gallery with angular 9.1.

i am fetching images from web services and building url attaching it like below:

this.service.getAllImages('5ef814a570f45211f5b2b508').subscribe((res: any) => {
      res.forEach(img => {
        this.galleryImages.push({
          small: `/api/image/get/${img.imageid}/sm`,
          medium: `/api/image/get/${img.imageid}/md`,
          big: `/api/image/get/${img.imageid}`
        });
      });

    });

once i move arrow on gallery it shows images otherwise totally blank.

frndxyz avatar Jun 28 '20 06:06 frndxyz

Avoid doing the this.galleryImages.push in favour of:

this.galleryImages = res.map(item => { return { small: /api/image/get/${img.imageid}/sm, medium: /api/image/get/${img.imageid}/md, big: /api/image/get/${img.imageid} }});

Anywhere you're adding new records, just replace the existing galleryImages.

sqljim avatar Oct 31 '20 11:10 sqljim

Avoid doing the this.galleryImages.push in favour of:

this.galleryImages = res.map(item => { return { small: /api/image/get/${img.imageid}/sm, medium: /api/image/get/${img.imageid}/md, big: /api/image/get/${img.imageid} }});

Anywhere you're adding new records, just replace the existing galleryImages.

Thank you!

mhubis avatar Jan 15 '21 16:01 mhubis

Avoid doing the this.galleryImages.push in favour of:

this.galleryImages = res.map(item => { return { small: /api/image/get/${img.imageid}/sm, medium: /api/image/get/${img.imageid}/md, big: /api/image/get/${img.imageid} }});

Anywhere you're adding new records, just replace the existing galleryImages.

Thank you

jijodaniel1995 avatar May 04 '21 06:05 jijodaniel1995

did that fix the problem?

andrejm7 avatar May 04 '23 17:05 andrejm7