[英]Is it possible to create a nunjuck template literal inside another nunjuck template literal in A-Frame?
我想在“建筑”模板文字中包含“玻璃”模板文字。
<script id="building" type="text/x-nunjucks-template">
{% for x in range(0, 5) %}
<a-entity template="src: building.template; type: handlebars" position="{{ x * 5 }} 0 0">
</a-entity>
{% endfor %}
</script>
<script id="glass" type="text/x-nunjucks-template">
{% for x in range(0, 5) %}
<a-entity template="src: glass.template; type: handlebars" position="{{ x }} 2 2">
</a-entity>
{% endfor %}
</script>
我知道它们需要在.HTML文件中运行-我只是想知道是否可以解决这个问题,因此可以做到以下几点:
index.html-> building.template-> glass.template
谢谢
使用{% raw %}
。
{% raw %}
some nunjucks templating
{% endraw %}
而且它不会在外部模板上呈现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.