angular2-image-gallery
angular2-image-gallery copied to clipboard
can't assign dynamic metadata url
in gallery we need to provide [metadata] in case of using external json file for images, here always we need to put hard coded URL like "'/assits/img/images.json'", but here we can't put dynamic URL like [metadata]="'{{url}}'" where url consists dynamic url bind from typescript/angular class.
try following line in your ts file this.metaDataURI = "data:application/octet-stream," + encodeURIComponent(JSON.stringify(yourARRAY)); HTML - <gallery [flexBorderSize]="3" [flexImageSize]="7" [metadataUri]="metaDataURI" (viewerChange)="viewerChange(this)">