Routing is the process by which Meteor decides what the screen should show based upon the URL in the address bar.
Routing is not “built-in” to Meteor. Instead, there are a variety of “plugins” (i.e. packages) to implement routing. The officially recommended package for supporting routing in Meteor is called “Flow Router”. In addition, there are a number of smaller packages that extend FlowRouter with useful functionality. This page provides links to the most useful resources for learning about routing in Meteor.
Start with the Meteor Guide chapter called URLs and Routing. This provides a general introduction along with code samples using Flow Router.
The next stop is the Meteor Routing Guide using FlowRouter. This guide is written by the developers of FlowRouter. In addition, the FlowRouter README provides a useful reference guide.
Once you understand the basic principles of routing, and how they are implemented using FlowRouter, you can check out a couple of packages that provide useful utilities. Meteor Flow Router Helpers provides some nice helper functions such as pathFor
, and Active Route to make it simple to implement things like highlighting the current page in a navbar. BowFolios provides examples of using both of these packages.