crystalui / angular-lightbox

A simple, responsive lightbox component.
Apache License 2.0
21 stars 13 forks source link

Can't get multiple images fron an array #15

Open RobertCrx opened 3 years ago

RobertCrx commented 3 years ago

I am trying to build a lightbox gallery and replicate for each user on the page. Well while i pass images into <img [src]="post.images" i get all the images concatenated like : img1.jpg,img2.jpg,img3.jpg and it doesnt work..

page.ts

this.getFullProfile().subscribe((fullProfile: any) => {
      console.log(fullProfile);
      this.userProfile = fullProfile.dataUser;
      this.userPost = fullProfile.userPost;

      console.log(this.userPost);
      this.userProfileSubject.next(this.userProfile);
      this.userPostSubject.next(this.userPost);
   })

  }

page.html

<ion-col size-md="12" size-lg="12" size-sm="12" size-xs="12" *ngFor="let i=index; let post of userPost">
     <div lightbox-group class="lightbox-{{i}}">
            <img id="test{{i}}" src="{{post.images}}" lightbox [fullImage]="{path: post.images}" />
           </div>
</ion-col>

What can I do to get all the images inside each other lightbox Example JSON: https://i.stack.imgur.com/gR37p.png