I'm currently working with ui-router
and have set up a parent state that includes several child states as shown below:
.state('portfolio.patent', {
url: '/:patentId',
controller: 'patentItemCtrl',
controllerAs: '$ctrl',
templateUrl: 'app/templates/patent/patent.patent-item.tpl.htm',
})
.state('portfolio.patent.patent-info', {
templateUrl: 'app/templates/patent/patent.patent-info.tpl.htm',
url: '/',
controller: 'patentInfoCtrl',
controllerAs: '$ctrl'
})
.state('portfolio.patent.notifications', {
templateUrl: 'app/templates/notifications/notifications.tpl.htm',
url: '/',
controller: 'notificationsCtrl',
controllerAs: '$ctrl'
})
In this setup, I aim to load these child states into separate tabs, divided between left and right tabset
components like this:
<div class="col-xl-6 ">
<uib-tabset active="activeLeft">
<uib-tab index="0" heading="Details" data-ui-sref=".patent-info"></uib-tab>
</uib-tabset>
<div ui-view></div>
</div>
<div class="col-xl-6">
<uib-tabset active="activeRight">
<uib-tab index="1" heading="Notifications" data-ui-sref=".notifications"></uib-tab>
</uib-tabset>
<div ui-view></div>
</div>
While the current setup partially works by loading content in both views, without named views, the selected tab displays content in both the left and right ui-view
elements instead of having patent-info
load in the left tabset and notifications
in the right tabset.
Question
If I modify the ui-views to be <div ui-view="leftTab>
and <div ui-view="rightTab">
, what syntax should I use for ui-sref
to achieve this?
For instance:
data-ui-sref="@righTab.notifications"
(I realize this is not correct)