Angular – resolving route data

In angular 1 resolving data into a route and using them in controllers was really straightforward. Below injecting orders into ordersController.

In angular 2 / 4 / 5 it’s quite more complicated. First, you need to create resolver:

Then you need to register your resolver in AppModule:

And add resolver in routes:

Continue reading