Questions tagged [iron-router]

A Meteor smart package for client and server side routing in Meteor.

Iron Router is a routing package for Meteor. It makes single page apps.

IR takes control of your tag, rendering templates based on the user's current URL. It also helps you set up subscriptions per-route and much more.

Iron Router works with Meteor 0.8.0 and above.

More information available here

1657 questions
0
votes
1 answer

Account login callback in client similar to the server-side onLogin()

Is there a similar callback on the client-side to the Accounts.onLogin()? I am creating a custom signin process, and when the user logs in successfully I would like to route them back to the page that they were going to that triggered the login. I…
CodeChimp
  • 8,016
  • 5
  • 41
  • 79
0
votes
2 answers

Strange behaviour of Meteor.collection.find()

I stuck with strange behaviour in meteor -> iron router this.route('addItem', { path: '/additem/:_owner', action: function(){ var c = Presentation.find().count(); var id = Presentation.insert({ …
vnm
  • 11
  • 3
0
votes
1 answer

Meteor + Iron-Router - how do I update my template's data context in response to events the user generates in my template?

So I have a route that sets my template Router.route('audit', { path: '/audit/:audit_id/', template: 'audit', data: function() { if (this.ready()) { audit_obj = Audits.findOne({_id: this.params.audit_id}); …
tadasajon
  • 14,276
  • 29
  • 92
  • 144
0
votes
1 answer

How do I handle disconnected user in meteor / iron:router

Iron Router has this awesome method onStop which lets me write code for when a user navigates away from a page. How can write that same code when someone disconnects, like closing the browser, for instance. Thanks
azium
  • 20,056
  • 7
  • 57
  • 79
0
votes
0 answers

Using library functions inside Meteor.js router/initialization

I am wondering if there is a way to use a library or other custom function within the router.js file (using iron-router) for a meteor app. The code is like this: Router.map(function() { this.route('editorder', {path: '/editorder/:_id',…
Ryan Weiss
  • 1,308
  • 1
  • 14
  • 36
0
votes
2 answers

I get error on object - meteorjs iron-router internet explorer 8 (ie8)

I have the latest iron-router and meteorjs. Everything is working perfect except in internet explorer 8. My target to support are at least ie 9 & 8. Every other browser is working perfectly including ie 9, except ie 8. I'm getting this…
0
votes
1 answer

Router doesn't wait for subscription

My problem is that I have two similar paths and in first one router waits for my subscriptions and renders whole template, but the second one is rendering right away with no loading and data passed is causing errors(since there is no collection…
sdooo
  • 1,851
  • 13
  • 20
0
votes
1 answer

How can I disable HTTPS/SSL on a specific page in Meteor?

On one of the pages in on my website, I need to have an iFrame that often displays content from http sites. I haven't found a way to display that information on my https page. After looking around, I think the best solution might be to remove…
David Mckee
  • 1,100
  • 3
  • 19
  • 35
0
votes
1 answer

Keep Meteor Template Rendered After Routing

I want to allow my meteor app to work if a user goes offline. As of right now I am using Iron-router as my router. My App works great until a user goes off line and tries to navigate around the app. The current page is fine but the routes are blank.…
Nate
  • 1,875
  • 15
  • 27
0
votes
1 answer

Iron Router / Meteor : Except not working

I am trying to get the login process to work. basically, all routes should get redirected to "/login" if the user is not logged in. All except "/signup" and "/reset", because you obviously wont be logged in if you go there. Router.configure({ …
0
votes
1 answer

Meteor : Load javascript file but don't execute. Execute on demand

I want to load a javascript file but do not want a "" tag created for it. I am using iron-router. So, I want this js file to execute in 'onAfterAction' hook, i.e. after the template is loaded. I am…
Anish Singh
  • 881
  • 1
  • 13
  • 33
0
votes
0 answers

Iron router not redirecting to proper url

I've written some code that allows someone to submit a form, then an email method gets called, and the user is redirected to another page. Here's the code: Template.home.events({ 'click .send': function () { var fromEmail =…
Joshua Terrill
  • 1,995
  • 5
  • 21
  • 40
0
votes
0 answers

Data context not making it to template with Iron Router

I am working on a sample app that will act as a journal. As such, I need to create dynamic routes. My code in router.js looks like: Router.route(':month/:day/:year', { name: 'listView', data: function () { var month = this.params.month; var…
gsd20
  • 1
0
votes
1 answer

How to avoid the automatic loading of all files in order to separate loading for some routes(e.g. /admin)?

Meteor concatenates, minifies and compiles all html, css and javascript and sends them all to the client. But as I noticed, it's not useful for some cases. For example, for most users we have app which works on myapp.com and another big part of app…
pronevich
  • 856
  • 8
  • 12
0
votes
1 answer

Access Template.TemplateName.helpers from Template.helpers and vice versa

Is there a way to gain access to the Template instance from a global helper and vice versa? /lib/route.js (with Iron Router): Router.route('/', {name: 'home.view', controller: 'homeController'}); homeController = RouteController.extend({ …
Aaron
  • 3,068
  • 2
  • 21
  • 44