[英]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.