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

iron router: is it a good idea to subscribe a collection in onBeforeAction?

Iron router provides a mechanism to wait till a subscription is ready using "subscription" or "waitOn". But the page doesn't get rendered until the subscription is ready. In my case, I have some large collections that may take some time to…
Fei
  • 769
  • 2
  • 7
  • 13
0
votes
1 answer

Meteor: Convention to configure routes specific to user-type

I am creating an application where there are two user types. This is determined upon user creation. This field is located in Meteor.users.userType: publisher or it can be userType: reader. Apart from both userTypes sharing the same home page…
meteorBuzz
  • 3,110
  • 5
  • 33
  • 60
0
votes
0 answers

MeteorJs RouteController 'HomeController' is not defined

I am trying eventedmind 'em' tool for creation of project. I used 'em' to create a route. 'em' created a route in '/both/router/routes.js', a '/client/controllers/home.js as HomeController and '/client/views/home' folder with html css and js…
Simpanoz
  • 2,729
  • 10
  • 43
  • 64
0
votes
1 answer

IronController Helpers not working

i am farely new to meteor, so it might be obvious. I am trying to define some routes: Router.route('/translations', {name:'translation.index'}); Router.route('/translations/:_id', {name:'translation.show'}); I also have defined a Controller which…
m0c
  • 2,180
  • 26
  • 45
0
votes
1 answer

RESTFUL API : new Iron Router version this.request.body not working anymore

I had my API fully functional and everything was working like a charm but with the last updates of Iron Router (Meteor update could impact?) my command this.request.body doesn't render nothing when I have a POST call on my API (all calls work good…
ibox
  • 31
  • 8
0
votes
1 answer

Remove multiply:iron-router-progress log messages - Meteor 1.0

I recently installed the package multiply:iron-router-progress after I upgraded to the new iron-router package and Meteor 1.0. Now various log messages appear in my console: [Log] IR:after (multiply_iron-router-progress.js, line 106) [Log] IR:re-run…
user3475602
  • 1,217
  • 2
  • 21
  • 43
0
votes
0 answers

Reactivity gone in meteor + iron-router app when returning to page with back button

In my app I have a page with some reactive elements that are updating ok when the underlying data changes. If I leave the page to go to some other page in the app using (Iron Router) Router.go(...) and then return to the previous page with the…
willemx
  • 530
  • 7
  • 19
0
votes
2 answers

How to use routeControllers in a package

My app is made of packages. If I set up routes with iron router in one package, everything works as it should : Router.route('/sessions', { name: 'ride_sessions.list', template: 'RideSessionList', action: function () { …
jadus
  • 241
  • 2
  • 12
0
votes
2 answers

meteor loads script before DOM is ready - script is inside meteor.startup function

I'm trying to use document.querySelector("body") but i'm not getting any html elements back. Why is that, the call to my script is inside meteor.startup? I'm using iron router for my routing... if(Meteor.isClient){ …
kevinius
  • 4,232
  • 7
  • 48
  • 79
0
votes
2 answers

Facebook likebox and Twitter feed are blank on second view in Meteor app

I have put a Facebook likebox and a Twitter feed into my Meteor app's homepage. The first time you navigate there, it works fine. But if you leave the page (while staying on the site), and then return, they are blank. This happens on multiple…
0
votes
2 answers

meteor iron router basic example. Can't make it route

I simply created a meteor project and copy/paste from the example 'basic' files (found at https://github.com/EventedMind/iron-router/tree/devel/examples/basic) replacing Meteor project .html and .js files. On the HTML, the example failed to include…
Juliomac
  • 447
  • 7
  • 15
0
votes
0 answers

Meteor user find noting returning any users in publish

I'm not getting back any users in my publications, it's a bit weird. I'm pretty sure I have everything setup correctly. The console.log count is showing me 14 which is correct Meteor.publish('collaborators', function() { …
Almog
  • 2,639
  • 6
  • 30
  • 59
0
votes
1 answer

Meteor stop subscription if change route

I have two routes with two templates. In one of them, the user subscribe to a collection after clicking a button. 'click #play' : function() { Meteor.call('create_game', this._id, function(error, result){ Meteor.subscribe('game',…
user2409399
  • 257
  • 2
  • 16
0
votes
1 answer

Iron-router & PathFor

When I am using route without params, I've got normal pathFor in my template. But when I am adding some "slug", like this: @route "pagesSlug", path: "/page/:_slug" name: "page" And got error in console: You called Router.path for a route named…
Vladislav
  • 371
  • 4
  • 12
0
votes
1 answer

Iron router dynamic template rendering

In my meteor project, I have added iron:layout, iron:dynamic-template along with iron:router. My question is, how can you prevent the dynamic template from rendering if there is no data available in the Session? The reason is, the dynamic template…
meteorBuzz
  • 3,110
  • 5
  • 33
  • 60