Using the Angular DocumentViewer in Lazy Loading Material Tabs

General News

Summary

Angular Material tabs group content into separate views where only one view can be visible at a time. The tab page content is loaded dynamically into the DOM when activated and remove when the tab is switched. The TX Text Control DocumentViewer must be initialized and remove when used in lazy loading tabs (or any other partial view conceptional element). The following app.component.html shows a typical scenario with 3 tab pages where the DocumentViewer is used on the second tab: In the event handler of the selectedTabChange event, the DocumentViewer must be initialized explicitly using the init method: In an interval, we make sure that the TXDocumentViewer object is available in the JavaScript scope before the init method is called. This way, a clean instance of the DocumentViewer is created when the tab page is opened.

Classifications

industries
No industries detected
applications
ERP & Process Management

AskAI Classifications

Labels
Document Processing Software Development Tools Software Components

Linked Companies

Text Control GmbH
$1M to $5M