Accessing params after upgrade


I’m trying to upgrade our project to latest package versions, and I’m having a problem accessing params in routes. I added router service and did solve some deprecation issues with QueryParams, but I`m stuck with the params.

With older version we used this logic: transition.params[''].type but now even if I have router in place my params is an empty object.

Maybe you are looking for this.paramsFor('')?

But if you really need to find them on a transition object, transition has .to and .from which are both RouteInfo objects which have params.

@ef4 thanks for the reply. I tried earlier with .to and .from but those are empty objects.

I will try with the paramsFor let`s see if that helps.