[SOLVED] Using queries with Iron Router


#1

How do I define queries as part of Meteor routes with Iron Router. Right now this is not working:

Router.route('/signup/?token=:token', {})

Just gives me a forever waiting spinner, as if the route exists but is waiting for something (and I have no waitOn or subscriptions setup for this route).

How do I properly define queries for Iron Router?


#2

You don’t define the query string in the route. You can access the keys in the query through this object: this.params.query


#3

So how would I define the route itself if I’m expecting a query to be a part of it?


#4

'/signup'

A query string already contains key/value pairs.
If there is a query string you can access the values as above.