【发布时间】:2019-03-22 03:11:44
【问题描述】:
我的代码有问题。我是学习 Meteor 的新手。我已经有几个小时无法修复它了。我在我的练习站点中加入了一个旋转木马,但它并没有按照预期的方式工作,所有的图片都刚刚出现。我从引导程序的网站复制粘贴了轮播模板并将其存储在模板标签中。
<template name="Carousel">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="/images/1.png" alt="">
</div>
<div class="item active">
<img src="/images/2.png" alt="">
</div>
<div class="item active">
<img src="/images/3.jpg" alt="">
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</template>
这是我调用轮播模板的 homelayout
<template name="HomeLayout">
{{> yield "Navigation"}}
{{> yield "Carousel"}}
</template>
这是我的路线
Router.route('/', function () {
this.layout('HomeLayout');
this.render('Navigation', {to: 'Navigation'});
this.render('Carousel', {to: 'Carousel'});
});
此外,我能否获得有关在 Meteor 中正确编码页面路由的提示/反馈?
非常感谢您的所有帮助。非常感谢。
【问题讨论】:
标签: meteor meteor-blaze