Я пытаюсь иметь более одной страницы на моем приложении метеорита, я запускаю метеор 1.3.1 и последний железный маршрутизатор.Железный роутер работает только с одним маршрутом
Это мой файл main.js.
Router.route('/home', function() {
this.render('home');
});
Router.route('/register', function() {
this.render('register');
});
Это мой main.html файл
<template name="home">
<h1>Hello there !</h1>
</template>
<template name="about">
<h1>this is an about page!</h1>
</template>
<template name="register">
<h2>Register</h2>
</template>
Теперь, если я перейти к http://localhost:3000/home
я могу видеть hello there!
Но если перейти к http://localhost:3000/register
я вижу Oops, looks like there's no route on the client or the server for url: "http://localhost:3000/register."
Однако если я переключу положение маршрутов в файле js на это:
Router.route('/register', function() {
this.render('register');
});
Router.route('/home', function() {
this.render('home');
});
затем страница регистрации работает, а на домашней странице нет.