0

I'm pretty new to Angular, so please excuse me if i ask an obvious question.

I'm wondering if there is a way in Angular2+ to get the previous state of query params within a component's resolver. I mean the configuration of the query params before I land on the current page.

I prefer not to install external packages.

Nicola Scionti
  • 380
  • 1
  • 12
  • This should help: https://stackoverflow.com/questions/41038970/how-to-determine-previous-page-url-in-angular – vaira Dec 22 '21 at 13:12
  • Not realy, because `resolve` method will invoked every time the URL changes. So the subscriptions will be lost. – Nicola Scionti Dec 23 '21 at 14:22

1 Answers1

0

Since the resolver is a class, it can have members. I solved storing the current configuration oh query params inside a resolver's member.

Nicola Scionti
  • 380
  • 1
  • 12