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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -