How to pass parameters when going to a different menu

so I have 2 menu items,

let's call them Menu A and Menu B!

I use the standard PanelMenu to display them.

Now how can I do it that, when I go from Menu A to Menu B, it sends a couple of parameters over there?

If I just modify the path of the Menu B, to be : "menuB/myParam", I will get the error:
Cannot match any routes

so what is the correct what do pass parameters from a menu to another?

Put a button on Menu A. This button's click event add navigate to page action (or open dialog action), select Menu B page and click + parameters button to add parameter Fill parameter name (for example id) and value properties.
You can use this parameter from Menu B like this: ${}