Hi!
I need create a view with tabs but using nesteds views:
For example:
touch tab “info” and render info.html in ui-view
touch tab “promotions” and render promotions.html in ui.view
My code:
// item layout
.state('item', {
url: '/item',
abstract: true,
templateUrl: 'templates/item.html',
})
// setup an abstract state for the tabs directive
.state('item.tab', {
url: '/tab',
abstract: true,
templateUrl: 'templates/tabs.html'
})
// Promotions Tab
.state('item.tab.promotions', {
url: '/promotions',
views: {
'item': {
templateUrl: 'templates/promotions.html',
controller: 'PromotionsController'
}
}
})
// Info Tab
.state('item.tab.info', {
url: '/info',
views: {
'item': {
templateUrl: 'templates/info.html',
controller: 'InfoController'
}
}
})
item.html:
<ion-view has-tabs="true">
...
<ion-content padding="true" ng-controller="ItemController">
<div ui-view name="item"></div>
<script id="promotions.html" type="text/ng-template"></script>
<script id="info.html" type="text/ng-template"></script>
</ion-content>
<ion-nav-view></ion-nav-view>
</ion-view>
I geting empty result:
Thanks!