Skip to content

how to disable thumbnails ngx gallery pop up #451

Answered by MurhafSousli
arunvlogic asked this question in Q&A
Discussion options

You must be logged in to vote

You need to get the reference of that gallery and change its config

import { Component, OnInit } from '@angular/core';
import { Gallery, GalleryItem } from 'ng-gallery';
import { Lightbox } from 'ng-gallery/lightbox';

export class AppComponent implements OnInit {

  galleryId = 'myLightbox';
  items: GalleryItem[];

  constructor(public gallery: Gallery) { }

  ngOnInit() {
    // Load items into gallery
    const galleryRef = this.gallery.ref(this.galleryId);
    galleryRef.load(this.items);
 
    // Disable the pop-up thumbs
    galleryRef.setConfig({
      thumbs: false
    });
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MurhafSousli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants