This is not working when I try to link my additional html page on the tab.html
ion-tab title="Subscription" icon-off="ion-ios-copy-outline" icon-on="ion-ios-copy" href="#/tab-subscription"
<ion-nav-view name="tab-subscription"></ion
I have tried the following
ng-href="tab-subscription.html"
and
ui -sref
This is my directive
.state(‘tab.subscription’, {
url: ‘/subscription’,
views: {
‘tab-subscription’:
{
templateUrl: ‘tab-subscription.html’,
controller: ‘SubscriptionCtrl’
}
}
})
instead of href try ui-sref=“tab.subscription”
you need to have abstract state for tab
.state(“tab”, {
url: “/tabs”,
abstract: true,
templateUrl: “templates/tab.html”,
}
)
yeah I wrote this:
.state(‘tab.subscription’, {
url: ‘/subscription’,
views: {
‘tab-subscription’:
{
templateUrl: ‘tab-subscription.html’,
controller: ‘SubscriptionCtrl’
}
}
})
No! you still need abstract for tab
Please check
// setup an abstract state for the tabs directive
.state(‘tab’, {
url: “/tab”,
abstract: true,
templateUrl: “templates/tabs.html”
})
// Each tab has its own nav history stack:
.state(‘tab.dash’, {
url: ‘/dash’,
views: {
‘tab-dash’: {
templateUrl: ‘templates/tab-dash.html’,
controller: ‘DashCtrl’
}
}
})
.state(‘tab.chats’, {
url: ‘/chats’,
views: {
‘tab-chats’: {
templateUrl: ‘templates/tab-chats.html’,
controller: ‘ChatsCtrl’
}
}
})
.state(‘tab.chat-detail’, {
url: ‘/chats/:chatId’,
views: {
‘tab-chats’: {
templateUrl: ‘templates/chat-detail.html’,
controller: ‘ChatDetailCtrl’
}
}
})
.state(‘tab.subscription’, {
url: ‘/subscription’,
views: {
‘tab-subscription’:
{
templateUrl: ‘tab-subscription.html’,
controller: ‘SubscriptionCtrl’
}
}
})
.state(‘tab.account’, {
url: ‘/account’,
views: {
‘tab-account’: {
templateUrl: ‘templates/tab-account.html’,
controller: ‘AccountCtrl’
}
}
});
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise(’/tab/dash’);
});
Ok that looks fine to me. Now show me your tabs.html
ui-sref you are missing a hyphen
Still not working I already changed it…The problem is that I have content on other tabs but not on my subscription tag…
maybe there’s a problem with your SubscriptionCtrl. Any errors in console?