I've added iron-router to my app to handle routing between the home page, an about page and the main page of the app which is a map
After adding iron-router with meteorite, I wrote a router.js file and placed it in my /client folder, however I'm getting an error that says "Uncaught ReferenceError: Router is not defined "
I checked the error with chrome devtools and it pointed to "Router.configure(..." at the beginning of router.js which I've added below
Router.configure({
layoutTemplate: 'layout',
loadingTemplate: 'loading'
});
Router.map( function () {
//the about route
this.route('about', {
path: '/about',
template: 'about',
action: function () {
console.log('now routing the about template');
}
});
this.route('home', {
path: '/',
template: 'home',
action: function () {
console.log('now routing the home template');
}
});
//the map route
this.route('map', {
path: '/map',
template: 'map',
action: function () {
console.log('now routing the map template');
}
});
});
Does anyone know why I'm getting the error that Router is not defined?