Skip to content

Root segment resolve block fails to execute on non-root segment refresh #76

Open

Description

@wingedfox
$routeSegmentProvider
  .when('/', 'root')
  .when('/sub', 'sub')
  .when('/sub/sub', 'sub.sub');

$routeSegmentProvider
  .segment('root', {
    templateUrl: '/views/main.html',
    controller: 'MainCtrl',
    resolve: {
      Settings: function(Settings) {
        return Settings.load();
      }
    }
  })
  .within()
    .segment('sub', {
      templateUrl: '/views/sub.html',
      controller: 'SubCtrl',
//      resolve: {
//        Settings: function(Settings) {
//          return Settings.load();
//        }
      }
    })
    .within()
      .segment('sub.sub', {
        templateUrl: '/views/sub-sub.html',
        controller: 'SubSubCtrl',
      });

Here, when I navigate to 'root' segment its' resolve block resolves correctly. When I navigate directly to 'sub' or 'sub.sub' segment, I have to define the same resolve in 'sub' block, because 'root' resolve is never getting resolved.
It seems that the segment bound to '/' path are somehow broken.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions