Hello
I would like to open new tab with Iron:Router. How can I open new tab with Router.go()
and pass some data?
I would like to need this options.
This is not an answer to the direct question but it may give you an idea…
I have an application which some content is displayed embedded while some is displayed in new windows. Here is the Iron Router route definition.
Hope it helps.
Router.route('/:appName?/:uniqueId?', {name: 'Home',
action: function() {
Session.set('uniqueId', Date.now().valueOf());
if (this.params.uniqueId) {
if (this.params.appName) {
var application = Applications.findOne({applicationName: appName},{});
if (application) {
if (!application.applicationEmbed) {
window.open(application.applicationURL, '_blank');
} else {
this.render('EmbeddedContent', {
to: 'embedded',
data: function () {return {applicationURL: application.applicationURL};}
});
}
}
}
}
else {
this.render('Banner', {to: 'embedded'});
}
this.render('Home');
}
});
Thank you for your help. I can use this
You can also do window.open(FlowRouter.url(routeName, params, queryParams), '_blank')
to wrap FlowRouter