Load Tabs on Demand

The TabStrip provides default options for creating and managing the content of its tabs.

By default, the component either creates the content of all its tabs when it is initialized or creates the content of each tab when the tab becomes active. When the tab is not in use anymore, the TabStrip destroys it. This specific default behavior depends on the value of the keepTabContent option.

To combine both approaches of loading the tab content on demand when a tab becomes active and keeping the tab content when the tab is no longer active, create a custom structural directive that can be placed in the content template of the tab.

View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?