I have my Angular component and a button on it. When I press the button, I trigger an event in which I have:
this.router.navigate('page2')
I know I can pass query parameters inside the url, but I have a list of strings to pass to the new page. Essentially, if I have to open page2 with a single entity to query, I would do:
url.../page2/entity1
But in my case, I want to send to page2 multiple entities, like entity2, entity3, entity4, and I don't want to pass them as query parameters because they could be many, sometimes also 500-1000!
So, what is the best way to pass this elements to another page using the routing? Consider that passing as query parameter a single entity and refreshing the page I don't loose the results, because the query parameters are in the URL and I just reload the page, so I don't want to loose it too in the case I pass more parameters but I don't have them in the URL! Is it possible?