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:

At the end, you gather data from route object:

And this is it 🙂