Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor|iron-router|what is the differences between Router.map and Router.route

As mentioned above, what is the differences between Router.map and Router.route in using meteor iron-router package?
In this tutorial, using 'Router.route'.
But in this tutorial, using 'Router.map'.
So what is the situation that I use 'Router.map' and the case that I use 'Router.route'

like image 783
ablian Avatar asked Oct 10 '14 01:10

ablian


1 Answers

They are different ways of doing the same thing. Router.map is deprecated in the new iron router though, so you should use Router.route (though Router.map would work for the sake of backwards compatibility).

like image 181
mark Avatar answered Nov 07 '22 21:11

mark