Kraken
Kraken

Reputation: 5910

Angular module dependency and $route.resolve

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.

Upvotes: 0

Views: 95

Answers (1)

Estus Flask
Estus Flask

Reputation: 223288

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.

Upvotes: 1

Related Questions