当我这样做的时候,它工作得很好
<body>
{{> carousel}}
</body>
<Template name="carousel">
....here the code of carousel...
</Template>但是当我使用iron-router来渲染模板时,它不会渲染carousel
<body>
{{rendreRouter}}
</body>
<Template name="carousel">
....here the code of carousel...
</Template>
Router.map(function () {
this.route('carousel',{
path: '/'
});
});发布于 2014-09-02 05:30:40
发布于 2015-07-06 17:40:43
在template.rendered钩子中初始化您的旋转木马,例如我的模板名为main_slider。
Template.main_slider.rendered = function() {
// init carousel here
};https://stackoverflow.com/questions/24328368
复制相似问题