Lazy initialization missing. Nav destroyOnHide=false inits all tabs immediately
See original GitHub issueBug description:
When a ngb-tabset
is created with [destroyOnHide]=false
, the content of all tabs is immediately created. With the default value of true
, content is only created when switching to the respective tab. From the naming and documentation I would expect the only difference in behavior to be that already created tab content is not destroyed on tab change. I would not expect it to immediately construct all tab content.
Version of Angular, ng-bootstrap, and Bootstrap:
Angular: 4.1.3
ng-bootstrap: v1.0.0-alpha.26
Bootstrap: 4.0.0-beta-6
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:7 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A simple workaround:
and
I reported it as a bug because the behavior conflicts with the name
destroyOnHide
as it also makes the tabset construct all tabs at load time while with the default value, it would not do that.@achimha’s wonderful workaround, updated for
ngbNav
(now thatngb-tabset
is deprecated)JS/TS
HTML