javascript - Meteor.js: iron:router including name -


in tutorials found 2 ways of using iron:router:

first one:

router.route("/", function(){     this.render("navbarmain", {         to: "navigation"     });     this.render("firstpage",{         to: "main"     }); 

second one:

router.route("/", {     name: "home",     template: "home" }); 

i add name attribute first code; tried adding in differenet places, none seems work. should put or there no way combine two? in case, how can refer root page (in pathfor)?

this should work.

router.route("/", function(){   this.render("navbarmain", {     to: "navigation"   });   this.render("firstpage",{     to: "main"   }); }, {   name: 'home' }); 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -