简体   繁体   English

在brunch.io项目中使用外部小胡子局部

[英]Using external mustache partials in a brunch.io project

I am working on a project that uses brunch.io and mustache for templating. 我正在开发一个使用brunch.io和胡须进行模板制作的项目。 I want to add mustache partials to the main index (which serves as a 'shell') to load in my content. 我想在主要索引(用作“外壳”)中添加小胡子局部,以加载我的内容。 I create the mustache partials in their own .mustache file and then add the tag on the index page (ie: {{> somePartial}} ) but what I seem to be missing is how to get the partial to render... Thats what I need help with. 我在他们自己的.mustache文件中创建了胡子局部,然后在索引页上添加了标记(即:{{> somePartial}}),但是我似乎缺少的是如何获取局部的渲染……那是什么我需要帮助。

我在早午餐应用程序中使用Mustache的Handlebars.js实现,它非常简单:只需通过Handlebars.registerPartial()部分注册。

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

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