简体   繁体   中英

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/

 $.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.

I'd suggest rendering the template off-screen and using transitions to ease it into and out of view.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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