You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
I read the source code and also the existing documentation you wrote for the router. Since I try to also sort of compare the old with the new router in the article, I need to explain the resolve $routeProvider config equivalent of the new router.
As far as I understand, instead of having this resolve block, we use canActivate and activate for it. Am I getting this right?
Whereas canActivate decides with the routing happens at all, activate is in charge of doing all the work that is needed to make needed data available in the controller. As you show in the docs, this could be something like:
this.bigFiles is what we usually would request in a resolve block. Please correct me if I'm wrong.
However, I still wonder how this behaves, if we have asynchronous work todo (actually the example looks asynchronous too). In the old router, resolve properties were injected into the controller that is associated to the view.
I understand that we don't need that anymore, as long as we just expose data on this (in the example this.bigFiles), since controller methods can just access it. But what if we have a promise, that needs to resolve first? Is that functionality also (still) supported in the new router?