I am working on a route that includes various parameters and queries:
For the parent route: path: "/:locale(en|jp)?"
And for the products route:
path: 'products/:category/:page?'
The query in product may include:
{
q: search string for filtering,
size: size value for filtering,
color: color value for filtering,
designer: designer value for filtering,
sort: sorting value
}
An example of the application can be viewed here
My question pertains to changing the size, color, or designer, where I would like to return savedPosition
from scrollBehavior. In all other cases, it should return {x:0,y:0}
I am wondering if there is a way to achieve this without having to check all query values from to
and from
within the scrollBehavior function, as it could unnecessarily complicate things. Instead, is it possible to pass a hint when pushing the route from the function that sets the color, size, or designer?