[Au2 Router] Generate URL, query params, reload?

Trying to port Au1 app to Au2, I have a pretty basic component (paginator) that is based on the (optional) query parameters of the route.

When changing the page, it navigates to the current route but with a modified “pageNumber” query parameter. The view controller is responsible for passing the pagination parameters along with the request to the backend.

Now, I am facing a number of issues:

  1. How do I pass query params (not named url segments) to router.load? In Aurelia 1, I believe all parameters passed that were not matched to the named segments of the route, were attached in form of a query params

  2. How to generate the URL programmatically? I used to have a href attribute as well, so the middle button / open in new tab would work as expected

I can’t seem to find any surface api for either of those.
Thanks in advance.

1 Like

@migajek Did you find a solution?

nope, I gave up on this. Created an internal service for generating links. This means I have to add the new routes twice - once to the router, once to the service - but it was the easiest solution for me.