Is there a way to bypass iron router when clicking a link. E.g. I want to go to mysite.com/some/page but I want to do a full (re)load, bypassing the client router. In Backbone one can use the data-bypass html attribute to achieve this e.g.
<a href="/some/page" data-bypass>My Page</a>
2 Likes
That’s server-side routes, not client side…
Anyway I realised I can just do this to trigger a full HTTP GET instead of the link being handled immediately by IronRouter:
<template name="MyTemplate">
<a href="#" class="some-class">Link</a>`
</template>
Template.MyTemplate.events({
'click .some-class': function() {
window.location.href = '/my/page';
}
});
2 Likes
For the record, I had a similar situation but I couldn’t have a special event, so I ended with the following ugly workaround:
<a href="#" onclick="window.location.href='/slug'>Link to Route</a>