July 2017
Intermediate to advanced
384 pages
8h 23m
English
There is only one event onImageClicked, which is fired when a displayed image is clicked on:
<p-galleria [images]="images" panelWidth="400" panelHeight="220" [autoPlay]="false" [showCaption]="true" (onImageClicked)="onImageClicked($event)"></p-galleria>
The invoked callback gets an event object. Beside index of the clicked image and the native click event, the passed in event object keeps the entire image instance from the collection. We could access the source URL in the callback and open the image in a new browser tab:
onImageClicked($event: any) { window.open($event.image.source, '_blank');}
Read now
Unlock full access