Angular nested state resolve and view


#1

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;
           }
         }
      }
    }
  });
  1. 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)

  2. I’m using ion-tabs, ion-tab, ion-nav-view and ion-view, where a tab has a ui-sref="state1" and even though I’m in state1.nested, it still thinks I’m on state1, so the state is not reloaded.