I am trying to pass request parameters to Router.go as below:
var filter = 'abc'; var path = Router.current() && Router.current().path; Router.go(path, {query: {filter: filter}});
But this does not change the url, it still loads the current path without a query string. But if I add the query parameter manually to the following path:
Router.go(path+'?filter='+filter);
this works great. But since I'm trying to load the same page with some filtered data. Thus, the click filter button re-adds the filter string again and again to the path.
What is the correct way to pass a query string using an iron router?
meteor iron-router
Aashu agarwal
source share