为什么铁路由器不渲染旋转木马? [英] Why iron-router does not render carousel?

查看:89
本文介绍了为什么铁路由器不渲染旋转木马?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我这样做时,它可以完美地工作

it works perfectly when I make it like this

<body>
{{> carousel}}
</body>
<Template name="carousel">
....here the code of carousel...
</Template>

但是当我使用Iron-Router渲染模板时;它不会呈现轮播

but when I use iron-router to render the Template; it does not render carousel

<body>
{{rendreRouter}}
</body>
<Template name="carousel">
    ....here the code of carousel...
 </Template>

Router.map(function () {
  this.route('carousel',{
    path: '/'
  });
});

推荐答案

我得出的结论是该功能似乎已消失.

I'm coming to the conclusion that the documentation you're reading is not in sync with the code base. In fact, it looks like the feature is gone.

在我自己对该主题的探索中,我有一个替代的解决方案可能对您有用在这篇文章的底部.

In my own exploration of the topic, I have an alternate solution at that may work for you at the bottom of this post.

这篇关于为什么铁路由器不渲染旋转木马?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆