genejr
genejr

Reputation: 21

How to open a route in a new tab or window with Meteor iron router

Have a click event that renders an html print view of a form. Is there a way to have this route opened in a new tab?

I dug around on here but don't find anything that addresses iron router.

Upvotes: 1

Views: 2006

Answers (1)

richsilv
richsilv

Reputation: 8013

You can just do:

window.open(Router.url(pathName, paramsObject, queryHashObject));

The only required argument is the path name. The other two are for if the route requires Iron Router parameters or a query-string or hash, in which case the format is exactly as here.

Upvotes: 5

Related Questions