Hide a parameter from the route

I am trying to pass parameters to a route, but only show the first parameter.

Example:

var params = {
            'debtorIds': this.debtorIds,
            'debtor_id': dbtr_id
        };
        
        this.router.navigateToRoute('customer', params);

What I want to be able to do is tell the route to only display the debtor_id param, and not the debtorIds param, because that one is an array of possibly thousands of ids.

Is this possible to do with aurelia’s router?

Is the array related to the id? Wouldnt it make sense to store that array in a service where both the root and target pages have access to and then only pass debtorId as param?

1 Like

You are absolutely right. It does make more sense.

I will be accessing the stored data in a different way, that way my route stays pretty.

Thanks for this.