I am trying to get the query parameters in the url.
There doesn\'t seem to be an easy way to do this...
which leaves me with the feeling that I must have mis
iron router >= 1.0
A route's query parameters are available as properties of this.params.query
.
If your URL looked like:
/posts/5?sort_by=created_at
then this.params.query.sort_by
would equal 'created_at'
.
iron router < 1.0
A route's query parameters are available as properties of this.params
.
If your URL looked like:
/posts/5?sort_by=created_at
then this.params.sort_by
would equal 'created_at'
.
Just call
Router.current().params //params is the dict you wanted
in Iron Router 7.1+