Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't assign dynamic metadata url #66

Open
gitsjhare opened this issue Jan 16, 2018 · 1 comment
Open

can't assign dynamic metadata url #66

gitsjhare opened this issue Jan 16, 2018 · 1 comment

Comments

@gitsjhare
Copy link

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.

@zankhna-mistry
Copy link

zankhna-mistry commented Jul 20, 2018

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)">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants