ablian
ablian

Reputation: 303

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'

Upvotes: 19

Views: 2881

Answers (1)

mark
mark

Reputation: 1725

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).

Upvotes: 21

Related Questions