gpt4 book ai didi

javascript - 我可以在 Angular 2 中使用标签模板吗?

转载 作者:行者123 更新时间:2023-12-02 14:54:47 25 4
gpt4 key购买 nike

例如:

<div class="content">
<h1>Title</h1>
{{ include("../tags/inputBox",{name:'abcd',value:1234}); }}
</div>
<div class="content">
<h1>Title 2</h1>
{{ include("../tags/inputBox",{name:'efg',value:567}); }}
</div>

或者没有提供?

最佳答案

您想要由 Angular 处理的模板(绑定(bind)、创建组件、指令……)必须静态提供。有一些丑陋的解决方法,并不能保证将来可以工作。

据我所知,唯一官方支持的方式是DynamicComponentLoader

关于javascript - 我可以在 Angular 2 中使用标签模板吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35911088/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com