0

I have an angular module that requires another custom angular module. The consuming module has a $route.resolve for one of the routes. If the module dependency is rendered in the page associated with that route, will that dependency module also wait for the completion of the resolve? I feel like the dependency module is bootstrapped before the consuming module, and would therefore not wait, but I just wanted to be sure.

5
  • 1
    Angular doesn't distinguish modules after bootstrapping. If a resolver is defined for current route, it will affect this route. If it's not, it won't. Commented Nov 8, 2016 at 19:07
  • If I understand you correctly, then the functions called from the dependency module's template should not execute until the resolve is completed. Is that right? Commented Nov 8, 2016 at 19:15
  • ng-view contents (route controller and route template) won't be intialized until route resolvers are resolved, everything else is the consequence. Commented Nov 8, 2016 at 19:21
  • Great, thanks for the quick response. I'd be happy to accept your answer if you want to post it as such. Commented Nov 8, 2016 at 19:22
  • Sure. You're welcome. Commented Nov 8, 2016 at 19:30

1 Answer 1

1

Angular doesn't distinguish modules after bootstrapping, it doesn't matter which module this dependency belongs to.

If a resolver is defined for current route, it affects this route.

ng-view contents (route controller and route template) won't be intialized until route resolvers are resolved. Resolvers won't affect anything outside of ng-view directive.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.