How to pass params when doing 'clear' navigation?


…it states that params can be optionally added:
navigate.clear(path, param1, param2, ...) — clear and navigate to the specified view path, passing params .

Without params, I am able to trigger the ‘init()’ function of the path I’m navigating to, using navigate.clear(‘my_path’)
However, when I add any params e.g. navigate.clear(‘my_path’, true), I get the message: “Error on action: Error: Expected 0 arguments (), got 1”

How do I pass params in according to the docs?

Does the view you are navigating to have the have the necessary XML ‘’ definitions?

How do you mean?

When passing parameters to a view you are passing vars that will become view xml variables, not JS params to that view. And in order for your view to be “ready” to accept xml params you need to define them in your view using “” tags.

So at the top of your view xml, before you define any view variables you need to define any params that will be passed to the view

View params

Oh right I see, thank you