铁路由器无法在流星中工作

时间:2018-08-17 15:27:58

标签: javascript meteor iron-router

我正在尝试创建一个具有某些形式的简单流星应用程序。我在上一个项目中曾与流星一起工作过,但好多天我都回到了它。如文档中所述,我安装了铁路由器,还创建了一些模板。但是问题是,即使我已经像以前的项目一样配置了相同的方法,也无法进行布线。

/client/main.html

<template name="header">
    <div class="ui inverted top fixed menu" style="background-color:blue;">
        <div class="item" style="padding: 0;">
            <img src="/logo.jpg" style="width:5.5em;margin:0;">
        </div>
        <a class="item" href="/features">Features</a>
        <a class="item" href="/test">Testimonials</a>
        <a class="item" href="/login">Sign-in</a>
        <a href="/request">Request</a>
    </div>
    {{> yield "page"}}
</template>

/lib/router.js

Router.configure({
    layoutTemplate: 'header',
    yieldRegions: {
        'requestForm': {to:'page'}
    }
});

Router.route('/features', function () {
    this.render('features', {to:"page"});
});

Router.route('/login', function () {
    this.render('login', {to:"page"});  
});

流星版本:1.7.0.4
铁路由器:最新

/server/main.js 中没有任何内容,无法找到问题! 有什么建议么?预先感谢。

0 个答案:

没有答案
相关问题