Home > front end >  How do I refresh the current route when arguments change?
How do I refresh the current route when arguments change?

Time:10-26

I'm using auto_route with some arguments as url parameters. If I push the same route as the one I'm currently on, but using different parameters, then the displayed widget is not updated.

Why not? Can I force it to update or is there a setting for auto_route to detect these changes?

CodePudding user response:

By default auto_route treats route name as its key. You can change that behavior with the usePathAsKey argument in the *Route class:

Property Default value Definition
usePathAsKey false if true path is used as page key instead of name

source

  • Related