【发布时间】:2019-05-12 03:29:37
【问题描述】:
<a-gltf-model id='playerone' {{#if myplayer playerone}}entitymove{{/if}} src="#myMixBun"> </a-gltf-model>
在 Meteor 中使用 Aframe,如果 myplayer 的值为“playerone”,我想添加自定义组件“entitymove”。
{{myplayer}}中{{myplayer}}的值是“playerone”,所以变量设置正确。但我收到流星错误“A template tag of type BLOCKOPEN is not allowed here”。
例如,如果“entitymove”是一个“类”,我想我可以通过以下方式解决这个问题:
<a-gltf-model id='playerone' class={{#if myplayer playerone}}entitymove{{/if}} src="#myMixBun"> </a-gltf-model>
但由于它是一个组件,我不知道如何修复语法。
【问题讨论】: