How to add a template to body in Meteor inside a package

后端 未结 3 1073
野的像风
野的像风 2021-01-11 17:12

I have this template:


Inside a Meteor app I can add this t

相关标签:
3条回答
  • 2021-01-11 17:33

    Solved! Add this line:

    api.use(['templating'], 'client');
    
    0 讨论(0)
  • 2021-01-11 17:36

    it is also important to include the html file before the js

    api.add_files("client/sampleTemplate.html", "client");
    api.add_files("client/sampleTemplate.js", "client");
    
    0 讨论(0)
  • 2021-01-11 17:44

    Include in file packages.js of package

    before

    api.use('meteor-platform');
    api.use('ui');`
    

    after first ".html" files, after ".js" files

    api.addFiles('filename.html','client');
    api.addFiles('filename.js','client');`
    
    0 讨论(0)
提交回复
热议问题