Passing query parameters using Router.go in iron router

前端 未结 4 1295
北海茫月
北海茫月 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 15:04

    I found that if your first parameter in Router.go is a path, instead of a template name, the query filter is not passed. Use a template name:

    Router.go(templatename, {_id: 1}, {query: 'q=s', hash: 'hashFrag'}); 
    

提交回复
热议问题