Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wingedfox opened this issue Nov 12, 2014 · 0 comments
Open

Comments

@wingedfox
Copy link
Contributor

$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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant