I'm using the Forge Viewer on an Angular 5 application.
Is there a way to completely unload the viewer so it can later be reloaded?
I have the following code to unload the viewer:
if (this.viewer && this.viewer.running) {
this.viewer.tearDown();
this.viewer.finish();
this.viewer = null;
}
And I also have the code to load the viewer every time the user enters the page.
Currently, when a user navigates to a different page on the application, that code gets executed, but when the user comes back to the page that contains the viewer, it shows a grey box where the viewer should be.
Here's a github repo that reproduces the issue: https://github.com/theivanaguilar/forge-viewer-reload
Am I missing something here?