简体   繁体   English

流星:JavaScript内的渲染模板

[英]Meteor: render template inside javascript

Basically trying to get this library going, but it's not rendering the template TableView inside the javascript that displays a sidepanel, from the jquery library at http://www.jqueryscript.net/demo/jQuery-CSS3-Powered-Slide-in-Panel-Plugin-slidePanel/ 基本上是尝试使该库运行,但它并未从位于http://www.jqueryscript.net/demo/jQuery-CSS3-Powered-Slide-in-的jquery库中的显示侧面板的javascript中渲染模板TableView 。面板插件幻灯片面板/

 $.slidePanel.show({
        content: '{{> TableView }}'
    }, {
        direction: direction,
        useCssTransforms3d: false,
        useCssTransforms: false,
        useCssTransitions: false
    });

This just shows the text literally, but I want the sidepanel to render the meteor template. 这只是按原样显示文本,但我希望侧面板呈现流星模板。

You could use Blaze.toHTML(Template.TableView) , however there is almost certainly a more meteoric way of doing this. 您可以使用Blaze.toHTML(Template.TableView) ,但是几乎可以肯定有一种更快速的方法。

I'd suggest rendering the template off-screen and using transitions to ease it into and out of view. 我建议在屏幕外渲染模板,并使用过渡来使其轻松进入和退出视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM