I am migrating my app from Angular 1.X to Angular 2.0 and I am having thoughts about routing solution while / after migration process.
I am currently using ui-router, with resolve
in order to pass data for each route.
After some reading I came across this post. As far as I understand, there is no resolve
in the new router. I now have two choices:
Continue using my current ui-router with my hybrid ng1-2 app (is it possible?), and bring each route's data via router's
resolve
. Will it work?Change routing and use the new
Component Router
. This will make the step-by-step upgrade harder, because I will have to change my current Angular 1.X data fetching to be inside each controller / directive + I won't have Angular 2's@CanActivate
which will wait for data to be resolved.
Which option is better? Is there another option? What will work here?
Thanks!