We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Issue : Could not access to my component variables on after-load callback function.
// my-component.ts onLoaded(pdf) { this.loading = false // <- loading unknown }
Proposal: Use Output instead of Input with pdf as return value.
// pdf-viewer.component.ts @Output() afterLoadCompleteEmitter = new EventEmitter() ... if (this.afterLoadComplete && typeof this.afterLoadComplete === 'function') { this.afterLoadComplete(pdf); } ... afterLoadComplete(pdf) { this.afterLoadCompleteEmitter.emit({ value: pdf }) } // my.component.html <pdf-viewer [src]="selected.value" (afterLoadComplete)="onLoaded($event)" [show-all]="true" [page]="1" [original-size]="true"> </pdf-viewer> // my-component.ts onLoaded(event) { const pdf = event.value this.loading = false // <- loading known }
The text was updated successfully, but these errors were encountered:
I've just see your binding in src example.
this.afterLoadComplete = this.afterLoadComplete.bind(this);
But Output wouldn't be a better workaround ?
Sorry, something went wrong.
Resolved by #47
No branches or pull requests
Issue : Could not access to my component variables on after-load callback function.
Proposal: Use Output instead of Input with pdf as return value.
The text was updated successfully, but these errors were encountered: