#Changing param dynamically

1 messages · Page 1 of 1 (latest)

finite timber
#

I would like to change param dynamically using a dropdown visible on all page. This dropdown objective is to change the param dynamically and not navigate to a specific location.
Ex: help/:id/me would change to the same page with different id, help/:id/metoo should change id as well without effect the URL. No reload, just param change and with it call new API.

proud beacon
#

I’ve done this a few times. My technique is to iterate over the router matches, building up a URL based on segments and params, and just swapping out the one param that you want to change.

#

I do think this is something the framework should provide and I’m thinking about writing an RFC for it

finite timber
#

@proud beacon do you have a sample for it? I would like to see.

proud beacon
#

Unfortunately I’m not able to share that code