[SOLVED] Using queries with Iron Router

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?

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

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


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