2 problems here (one of with may be Angular’s issue)
My state setup is:
$stateProvider
.state('state1', {
url: 'state1',
views: {
stateView: {
templateUrl: 'url/to/template.html',
controller: 'StateViewController as vm'
resolve: {
greeting: function () {
return 'Hello!';
}
}
}
}
})
.state('state1.nested', {
url: '/:personName',
views: {
pos: {
resolve: {
greeting: function ($stateParams) {
return 'Hello ' + $stateParams.personName;
}
}
}
}
});
-
In the nested state, the resolve is being called, but when the controller is initialised, the resolve in the parent is used (edit: so this looks to be the Angular thing)
-
I’m using
ion-tabs
,ion-tab
,ion-nav-view
andion-view
, where a tab has aui-sref="state1"
and even though I’m instate1.nested
, it still thinks I’m onstate1
, so the state is not reloaded.