You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a set of tabs using these very helpful (thank you!) directives that is working fine. However, I have run across a new consideration that I am hoping you may be able to offer some thoughts or ideas on please?
The scenario is a follows:
tabset contains a set of tabs, each of which corresponds to a route/state
each route/state has their own resolves associated with them
This works/functions just fine. However, I am noting that the resolves for ALLroutes/states are hit upon display of the tabset (even though obviously only a single tab is active/displayed at a time). This is normally not an issue; but, when the resolves are extensive and/or long running in nature, this is inefficient and may delay display of the targeted/active tab until the longest resolve has finished.
Any thoughts on how one might delay execution of the non-targeted tabs unit and if they are actually ever actived?
I attempted to use the tab.active value in combination with ng-if on the ui-view as shown below, but this did not delay or preclude the resolves for the non-active routes/states.
Upon further investigation, I have determined that this issues does NOT happen with using standard ui-router states associated with the 'route' attribute for the tab. It only occurs when using ui-router views to populate the tab contents with. In that case, loading them all simultaneously may be the expected behavior. However, if there are ideas to delay resolve loading even in that case, I'd still be interested in hearing about them.
I have a set of tabs using these very helpful (thank you!) directives that is working fine. However, I have run across a new consideration that I am hoping you may be able to offer some thoughts or ideas on please?
The scenario is a follows:
This works/functions just fine. However, I am noting that the resolves for ALLroutes/states are hit upon display of the tabset (even though obviously only a single tab is active/displayed at a time). This is normally not an issue; but, when the resolves are extensive and/or long running in nature, this is inefficient and may delay display of the targeted/active tab until the longest resolve has finished.
Any thoughts on how one might delay execution of the non-targeted tabs unit and if they are actually ever actived?
I attempted to use the tab.active value in combination with ng-if on the ui-view as shown below, but this did not delay or preclude the resolves for the non-active routes/states.
<tabset class="tab-container" type="{{::type}}" vertical="{{::vertical}}" justified="{{::justified}}"> <tab class="tab" ng-repeat="tab in ::tabs | roleAuthorized track by tab.heading" active="tab.active" disabled="tab.disabled" ng-click="go(tab)"> <tab-heading> {{::tab.heading}} <span ng-if="tab.newCount" class="newBadge">{{tab.newCount}}</span> <span ng-if="tab.actionCount" class="action">{{tab.actionCount}}</span> <span ng-if="tab.warningCount" class="problem">{{tab.warningCount}}</span> </tab-heading> <ui-view ng-if="tab.active"></ui-view> </tab> </tabset>
Any other ideas, suggestions or better approaches would be appreciated please!
TIA!!!
The text was updated successfully, but these errors were encountered: