Saturday, August 1, 2015

Meteor Application with Routing

In my last post I showed how to validate a form. This post I will explain how to add routing to a meteor application.
First add iron router plugin for the application.
Then we need to configure routes for the application.
Then add a new file called home.html into templates folder like below.
Application would look like below.
Rename client/home.html file into main.html and change the content like below.
Add route configurations to both/routes.js file like below. Output would look like below.
Now we will add bootstrap navigation.
Without using hard coded routes we can use route names like below.
Download source code from github.

No comments:

Post a Comment