meteor,iron-router
I have a meteor iron app I generated. In the eventedmind screencast the instructor searches packages with iron search ^accounts to see all meteor packages. When I run that though $ iron search ^accounts > meteor search app bin build config readme.md How can I search for meteor packages with...

meteor,iron-router
I am frustrated with the lack of documentation around Iron Router and Collections/publish/subscribe. I have some Publish statements (on the isServer part of the code in the site) that return data from Collections to the client. I call them in the route like this: Router.route('/project/:_id', { path: '/project/:_id', template: 'project',...

javascript,file,meteor,iron-router
One one page, I have a file selector input. When the user selects a file, I would like user to be directed to a separate route that contains an interactive image cropper that is used to prepare the image before I upload it to the server. Since I would like...

meteor,iron-router
I have created a pagination with configurable limit. I am getting page number from the IronRouter. The code works when I enter url manually with different page numbers. However, when I use go back with browser back button, it does change the url and I can see beforeaction and action...

meteor,iron-router
I'm using iron:router and alanning:roles and I want to restrict my SecretArea for only users who has been added to admin role. This works just fine if user is not logged in. But if user has logged in and she is an admin then the trouble starts. I can get...

meteor,iron-router
I just started using Meteor and Iron Router. Here I'm trying to use two data contexts but appearantly I'm doing it wrong. I've googled it but it doesn't seem this is a very common problem, but I guess it got to be possible to pass on two or more data...

meteor,routing,iron-router
Let's say you have the following route definitions: @route "home1", path: "/:homeSlug1 and @route "home2", path: "/:homeSlug2 and @route "home3", path: "/fixedPath and then go to localhost:3000/fixedPath in the browser how does Iron-Router choose the priority? It does not appear that the fixedpath route takes precedence over the parameterized route....

meteor,loading,iron-router
i want a loading template to appear before the site has all data to be rendered. And after the serverside Method gives me the Data(from an API [async]) via Meteor.call i want to load the correct layout. I tried many ways found on Google which describe similar but not exatcly...

meteor,iron-router
onAfterAction is run twice, once before the data arrives, and once after. Why is it run before the data arrives? Also, in this basic version, rendered is called after the data arrives, but in my app, it's called before the data arrives. Any idea why that might be? Basic reproduction:...

javascript,meteor,iron-router
I am trying to load templates using iron router and none of the templates for the routes load. The url will change when the items are clicked but the current page never changes. Lib/router.js - Router.configure({ // we use the appBody template to define the layout for the entire app...

meteor,iron-router
I'm got a route with few subscriptions where each one with some parameters for limiting data. Already known parameter only for first subscription, but all other based on data from item of first subscription. How i can handle it? Example (coffeescript): Router.route '/survey/:id/', name: 'survey', waitOn: -> Meteor.subscribe 'surveys', @params.id...

meteor,roles,iron-router
I want to restrict access to certain pages depending on users roles. So I don't want a logged in user to be able to just change the URL in their browser to navigate to a page they shouldn't have access to. So for such a route I'm doing something like:...

node.js,meteor,iron-router
I'm trying to manage my Meteor web app's API usage and have two questions. How do I know how the size of the incoming POST request data? Note that I don't care about the contribution from headers; I just want to know the size of the data part. How do...

javascript,meteor,iron-router
This question already has an answer here: How to check for Route through route name in template with Meteor and Iron Router 3 answers I'm struggling to find a way to access the 'name' property of a given route. Currently I'm wanting to do this in a route, but...

javascript,meteor,iron-router,spacebars
How do I use a template-helper to edit the value of the parameter I passed into a route created using the pathFor method of iron-router??? I have this template-helper: Template.registerHelper('slugify', function(obj){ return _.slugify(obj); }); in my .html file I have this: {{#each menuItemsFromDB}} {{#each arrayOfMenuItems}} <a class="item category" href=""> {{this}}...

meteor,iron-router
So I have a user profile and would like to have a "Favorites" section linked to it where favorited posts are displayed. My user profile URL looks like this in Iron Router: path: '/:username' And my "Favorites" URL looks like this: path: '/:username/favorites' And I'd like my user profile to...

javascript,html,meteor,iron-router
I have this in my dashboard.html {{#each todos}} <li class="list-group-item"> {{ task }} <button class="delete"> Delete</button> </li> {{/each}} and in the controller dashboard.js I have this DashboardController.events({ 'click .delete': function () { Meteor.call('ToDos.delete',this._id); } }); Without Iron Controller I can access the id of the collection in the event using...

javascript,meteor,iron-router
I have collection called Rooms, now, I want to publish different subsets of Room depending on where the user is on the app, so, this is what I had in mind: Meteor.publish('roomList', function() { return Rooms.find({}, {fields: {'roomId': 1, 'playerCount': 1, 'isPlaying': 1}}); }); Meteor.publish('roomInfo', function(_id) { return Rooms.find({_id: _id},...

meteor,iron-router
Hi I'm following the Discover Meteor book, and I'm in Chapter 5-3. I have the router.js and post_item.html precisely as the book, and for every url, I get something like /posts/undefined<id>. I can't figure out why undefined is present in front of every id. Below is my relevant code: Router.configure({...

javascript,meteor,iron-router
I'm trying to populate a meteor template based on a parameter I send in through the address bar. I'm using Iron router and when I looked in its documentation I found this example Router.route('/post/:_id', function () { this.render('Post', { data: function () { return Posts.findOne({_id: this.params._id}); } }); }); I...

meteor,iron-router
i am very new to nodejs and meteor. i need to create a page content-type application/json and data from mongo collection. So when collection data change json page must be change. For json page i use this example: http://stackoverflow.com/a/23666992/1446182 if (Meteor.isServer) { Meteor.startup(function () { try{ var interval = Meteor.setInterval(function()...

meteor,iron-router
I have Meteor application that uses Iron-Router in which the rendered screen is dynamic based on the URL. I have two parameters from the URL, station and screen. In the routing code: this.render(stationParam+screenParam, {to: 'content'}); However, I want to be able to check if the template stationParam+screenParam exists. Is this...

meteor,iron-router
I've got a list of menu items and each is an a tag. Inside those, I've got notification bubbles insides a div. When the notification div is clicked, I'd like to first follow the a tag (the hash is always to a Meteor route, using Iron Router) before it executes...

javascript,meteor,iron-router,meteor-helper
I have a meteorjs default layout file and i am routing to different pages using iron-route, What i am trying to do is not show navigation on the home page. I can do this by using two separate files but i want to do this with single file. <template name="layout">...

javascript,meteor,iron-router
EDIT: Here is the github repo. And you can test the site here. On the homepage, just open the browser console and you will notice that WaitOn and data are being run twice. When there is no WaitOn, then the data just runs once. I have setup my pages by...

meteor,iron-router,user-accounts
I want to redirect all users to a home page if they are not logged in. Currently I am doing this: Router.onBeforeAction(function() { this.render('loading'); if (! Meteor.userId()) { this.render('Home'); } else { this.next(); } }); Which I saw online, but this seems to be prevent my 'loading' template from ever...

meteor,iron-router,meteor-accounts
I am trying to use the ensureSignedIn plugin on all routes except for a front 'home' page that has buttons to login to separate parts of the site. Here's my route for 'home': Router.route('/', function () { this.render('home'); }); Here's the line for the plugin and exceptions: Router.plugin('ensureSignedIn', { except:...

javascript,mongodb,meteor,publish-subscribe,iron-router
I am trying to make sing post page a route where it does a several things using iron:router Uses the template postPage Subscribes to publication of singlePost, userStatus (shows status and info of Author of single post page'), comments . Grabs Comments documents that has field of postId : this.params._id...

mongodb,meteor,iron-router,mongo-collection
I'm fairly new to meteor and have encountered a problem while trying to use Iron Router to pass a url parameter to a Collection and retrieve some data for display. Specifically, I have a Collection with events and I'd like to have a page that display a single one in...

meteor,iron-router,velocity.js
so in the back of the 'discover meteor' book they explain how to do page transitions. i've got it working, however it causes problems with the loading of javascript functions and variables on other pages that its animating into. it seems they're not ready or simply don't exist at the...

javascript,forms,twitter-bootstrap,meteor,iron-router
I am trying to submit a new appetizer to a web app I am creating that resembles a cookbook. The layout has a constant header/nav that allows the user to add a new appetizer, which triggers a modal and a form containing the appetizer name, description and a photo. I...

meteor,iron-router
we have the problem with the router when we navigate from one to another page. Suppose when we are in template1 and we need to go to templete2.Then we do Router.go(/templete2) right.I need in the URl templete1/templete2.Please help me....

meteor,iron-router,meteor-accounts
My app consists of two pages, Homepage and Dashboard. On the Homepage, I want to show Login (top nav) and Register (main body). If the user is logged in then show the Dashboard. On the Dashboard I want to show Logout option. On logout show the Homepage. Problem: When I...

meteor,roles,iron-router
I have 2 roles, admins and users. I have a home route '/' that is just a sign in page. When admin users sign in they must go to one route ('adminPortal') and when user users log in they must go to the 'userPortal' route. On signing out both roles...

javascript,facebook,meteor,iron-router,user-profile
Currently when auto publish is removed, only {{currentUser.profile.name}} works.I'm trying to get {{currentUser.profile.first_name}} and the avatar from Facebook but have not been able to do so. Here is my code... On the Server side: Meteor.publish('userData', function() { if(!this.userId) return null; return Meteor.users.find(this.userId, {fields: { 'services.facebook': 1 }}); }); On Iron...

javascript,meteor,iron-router
I'm having some trouble trying to use the URL parameters in meteor with iron:router. On the home page if my app, I display a thread of posts. But I want to allow people to select a single thread by specifying its ID in the url. Like that, when someone click...

meteor,iron-router
I have a list of items fetched from a collection and I want to make it show different stuff depending what button is clicked. I figured I'd do this via sessions that update the publication. Here's my publication: Meteor.publish('stuff', function(filter) { var nameVar = filter || "default" return myStuff.find({name: nameVar})...

meteor,iron-router
Im using Meteor with IRON router and it's working great for dynamic files. But I have one statis legend.html file which I want to serve. I placed it in the public folder, but I get the error that the file can't be found. As it has been generated from word,...

javascript,mongodb,meteor,iron-router
My collection is created in collections.js portfolioCategories = new Mongo.Collection('portfoliocategories'); It is then subscribed to in subscriptions.js Meteor.subscribe('portfoliocategories'); And published in publications.js Meteor.publish('portfoliocategories',function(){ return portfolioCategories.find(); }); If I query Mongo from the server with db.portfoliocategories.find() I'll get { "_id" : "W9AeauCpMgPw2j5hf", "title" : "Commercial Design", "slug" : "commercial-design", "image" :...

javascript,meteor,iron-router
Using the latest Meteor and Iron Routing, how do I simply "go back" to the previous route? I feel silly even asking, because it seems this would be a main feature of Iron Routing.. For instance, say I went to "/contacts" from "/posts" and then I wanted to "go back"...

meteor,iron-router
Edit: The solution I used is @Kyll's one. Suppose the server side objects I'd like to return are "complicated" to build and need different attributes from different collections. I first tried: /server/publications.js Meteor.publish('myCustomDocument', function(){ // suppose here that I need to X.find() different collections // and create a complex Array...

javascript,d3.js,meteor,iron-router
This question follows my previous one : Meteor: How to publish custom JSON data I created a Meteor method building a complex JSON (built with different collections etc.). With those datas I need to build a chart using D3.js. I used to set the data in the Session but as...

javascript,meteor,iron-router
I want to jump to the previous page using iron router. Normally, I would have used the history.back() function but in this case, I use yield templates. The page I am in is reached using myWebsite.com/page which redirect to myWebsite.com/page/sub-page in order to display the default yield content. Tell me...

javascript,meteor,iron-router
I need to generate a simple XML file to call with Twilio. Currently, I am trying to output this at a particular route: <?xml version="1.0" encoding="UTF-8"?> <Response> <Say voice="woman" language="en">Hello, world!</Say> </Response> I plan on making it dynamic later and hence, cannot place it with the other asset files. In...

javascript,meteor,iron-router
When I click on user's name, I want the link to go to their profile page. I am using Meteor with iron router. Here are the defined routes: Router.route('/', { name: 'JobsList'}); //homepage with all users //this is where the user's profile is located and works: Router.route('/company/:_id/', { name: 'CompanyPage',...

meteor,iron-router
I have a button. When this button is clicked, I would like to display the loading template (using sacha:spin) for 5 seconds. 'click #submit-air': (e,t) -> e.preventDefault() ... I'm using iron:router, and from what I've read in the docs, it seems like the answer lies somewhere in hooks, but I...

meteor,iron-router
I have a route to display user parameters: admin/users/details/:userID In the template associated with this route I have "Back" button. What is the best way to pass "return route path" to Router.go() and access it later in Template.AdminUsersDetailsDetailsForm.events({ "click #form-back-button": function(e, t) { e.preventDefault(); Router.go(PARAM.NAME, {}); } ...

javascript,meteor,iron-router
I'm trying to migrate a two year old meteor project with many deprecated packages to the current version. But I'm stuck with iron-router and this: A route /map showing an interactive map with markers When a user click on a marker an absolute positioned div with full-width-height opens and show...

meteor,iron-router,meteor-autoform
I'm using Meteor with AutoForm & Iron Router. I have an autoform for inserting a data, and I want to redirect to the page of the data I added after a successful insert. How should I do it? Here is the For: {{#autoForm collection="Products" id="add" type="insert"}} <h4 class="ui dividing header">Products...

javascript,templates,meteor,iron-router
I'm setting up a body helper for use with Iron Router to use as {{route}}: Template.body.helpers({ route: function(){ alert(Router.current().route.getName()); } }); But Router.current().route.getName() returns undefined instead of "/thirdPage/"....

meteor,iron-router,slick-carousel
I am using iron-router, i have a route "models" which has a list of items. When the user clicks one of these items a new route "model" is used, the name of the selected item is passed as a param and used to load data about that model from the...

meteor,iron-router
Router.configure waitOn: -> Meteor.subscribe 'data' Does data get torn down and re-subscribed to when I switch from /bar to /foo, or does it stay subscribed to for the entire session, like the null publication?...

mongodb,meteor,iron-router
I tried calling Router.go('confirmation') to take the user to confirmation page once the information has been inserted into the database. Meteor.methods({ 'createNewItinerary': function(itinerary){ var userId = Meteor.userId(); ItineraryList.insert({ [....values.....] },function(){ Router.go('confirmation'); }); } In the server console, I get the response: has no method 'go' The data is inserted successfully,...

javascript,meteor,iron-router
I need a particular subscription for every route in my app, this works but I'm unsure if it is correct? Router.onBeforeAction(function() { Meteor.subscribe('locations'); this.next(); }); Also, is there a way to waitOn() globally?...

javascript,meteor,iron-router
Using FS.Collection to store files, I need to redirect to currently submitted file, but I can't get Iron Router working. It returns result._id, but don't route and just breaks. Here is the event change function for submitting files. 'change #input':function(event, template){ var email = template.find('#email').value; var title = template.find('#booktitle').value; if...

meteor,iron-router
I have a project that involves a dozen routes, all of which require a navbar and various other pieces that I would like to include in my layout template. My issue is that I have one and only one page that doesn't need a navbar. I could solve this by...

meteor,pagination,iron-router
Hi I have a simple app listing Posts and I am struggling to add a simple Pagination using the Iron Router along with Meteor Pagination: https://github.com/egtann/meteor-pagination I have the following in my index.js: if (Meteor.isClient) { Template.index.helpers({ posts: function () { return Posts.find({}, {sort: {voteResult: -1}}); }, } And therefore...

meteor,iron-router
I have an iron-router route for updating the data of a specific project: Router.route('/project/:key/update', { ... }); Each time the user navigates to an "edit project page" I want to focus the project-name input. template.onRendered(function() { this.$('form input[name="project_name"]').focus(); }); This works great when navigating from the Dashboard to any given...

meteor,iron-router
Looking at devtools profiling, when I move between two routes with the same layoutTemplate, the layout's helpers are being rerun, and it looks like the HTML is being rerendered as well. How can I have iron router only render the yields and leave the layout alone? EDIT code: Router.map ->...

meteor,iron-router
I am writing a meteor application with a user-role-system (alanning:roles) My Roles are group based. When a user knows my group url, it is allowed to access the group an get the role "defaultUser" in this group. localUser is allowed to subscribe to all the local stuff of a group....

javascript,meteor,iron-router
Currently i'm building a social network with Meteor.js, and faced a routing problem. Thats the required router behavior: On '/', if user is not logged, redirects to a langing page with login. On '/', if user is logged in, grabs his username and redirects to a profile page by '/:username'...

meteor,iron-router
I slightly extended the discovermeteor tutorial and added an image to every post in post_item.html: <img src="discover.png" height="40px" /> After putting discover.png in the public folder everything seems to work as expected. However if you open the detail page (click on 'discuss') and come back to the overview (click on...

mongodb,meteor,iron-router
I have a goals mongo collection. I am using Iron Router to navigate to each goal document via '/goals/:_id' This works great for clicking around the app. However, when a user adds a new goal to the collection (via server Insert method), I'd like to automatically navigate to that page...

meteor,routing,iron-router,middleware
The popular accounts-entry package has an iron-router related bug in it. I believe the later versions of iron-router changed to work better as middleware and so a call to Router.routes At line 87 of this file the following code is used: _.each Router.routes, (route)-> exclusions.push route.name # Change the fromWhere...

javascript,css,meteor,iron-router
I have a multipage meteor application with a navigation template included in each page. I use iron-router to switch between pages. I indicate which page the user is on by setting the appropriate navigation link's class to 'active. Example: navigation.html <li class="{{navClassName 'page1'}}"> <a href="/page1">Page 1 </a> </li> <li class="{{navClassName...

hash,meteor,iron-router
When using iron-router to scroll to a hash using an anchor button referencing the id of the next section, such as this: <a class="button" href="{{pathFor 'home' hash='about'}}"> iron-router happily takes us to the about section the first time the button is clicked. if you scroll back up using the mouse...

meteor,coffeescript,seo,iron-router
With Meteor 1.0.3.1 and Iron Router, I need to set the title dynamically for some pages, while defaulting to a certain title for other pages, using Manuel Schoebel's SEO package. How can I accomplish setting a dynamic page title for a certain route? I've set SEO up generally like this:...

javascript,meteor,routing,iron-router
How do I have the URL of a dynamically generated post be one of the attributes assigned to it? Say it's name? So instead of events/vbMmmw6ymrWXjtXPd the URL is events/name-of-the-event Here's my routing so far: Router.route('/events/:_id', { name: 'event', data: function() { return Events.findOne(this.params._id);} }); And my schema: Events =...

javascript,mongodb,meteor,publish-subscribe,iron-router
I'm trying to make a publishment statement to publish ONLY the author(OP)'s profile avatar. I am thinking of grabbing the _id of the page. And from that page, I will grab the userId which is the author's _id and try to show the profile. However, I have been very unsuccessful,...

meteor,iron-router
I know that to get current route's name I would need use do Router.current().route.getName(). What if I need to get route's name by given URL (not current URL). Let's say I have list of URLS urls = ['/orders', '/clients', '/clients/tJa84ogQ3cvpxMJ7G'] And I have following Iron Router configuration : Router.route('/orders', {name:...

javascript,meteor,handlebars,iron-router
I have a dynamic line of code: <label>{{title}}</label> //template name="header" I'm using iron:router, the app is super simple right now: Router.configure({ layoutTemplate: 'ApplicationLayout' }) Router.route('/', { template: "home" }) Router.route('/scientific', { template: "scientific" }) I'd like a solution that doesn't rely on Session as a way to dynamically render the...

javascript,meteor,iron-router
I want to pass object in data context in route. I am trying to read JavaScript object(which holds the business logic) . If i send the object as such , then i can read it's properties in template. But if i try to send a custom object by reading some...