我已经创建了一个jsFiddle创建一个基本的例子。FullPage.js和流星
http://jsfiddle.net/7PwsS/532/
它的jsfiddle的伟大工程,把它放在我的流星应用程序,当我点击链接它不工作,如果我滚动它。
这里是我的layout.html流星代码:在库文件夹
Router.configure({
layoutTemplate: 'layout'
});
Router.map(function() {
this.route('index', {
path: '/'
});
});
的script.js文件
<template name="layout">
{{> yield}}
</template>
<template name="index">
<div id="fullpage">
<div id="section0" class="section" data-anchor="firstPage">
<div class="col-sm-12 text-center">
<h1>fullPage.js</h1>
<ul id="menu">
<li data-menuanchor="firstPage">
<a href="#secondPage">First slide</a>
</li>
</ul>
</div>
</div>
<div id="section1" class="section" data-anchor="secondPage">
<div class="col-sm-12 text-center">
<h1>fullPage.js</h1>
<ul id="menu">
<li data-menuanchor="firstPage">
<a href="#firstPage">First slide</a>
</li>
</ul>
</div>
</div>
</div>
</template>
Routes.js文件服务器文件夹
Template.index.rendered = function() {
$('#fullpage').fullpage({
anchors: ['firstPage', 'secondPage'],
menu: '#menu'
});
};
它是奇怪的,我猜测与铁路由器有关吗?
干杯
Ĵ
我想'铁-router'正在捕捉你的链接,所以如果'fullpage'插件在'click'事件上重启,它将无法使用'iron-router'开箱。 –
关于如何使它与铁路由器工作的任何建议? –