Passing query parameters using Router.go in iron router

前端 未结 4 1311
北海茫月
北海茫月 2021-02-08 14:08

I am trying to pass query parameters in Router.go like below:

var filter = \'abc\';
var path = Router.current() && Router.current().path;
Router.go(path,         


        
4条回答
  •  無奈伤痛
    2021-02-08 14:48

    The parameters are Router.go(path, params, options). The query part should go in the options parameter, so try the following: Router.go(path, {}, {query: {filter: 'filter='+filter}}).

    EDIT

    Answer updated according to Robins comment below.

提交回复
热议问题