即使使用三个大括号,也不会在Handlebars模板中执行<script>标记

我正在使用Ember js来呈现我的网络应用程序中的主要内容。 Ember使用把手作为模板。 主要竞赛包含html标签和脚本标签。 我已经使用三个大括号转义了我的handlebars变量中的html标记。 这可以确保在呈现模板之后内容中的html标记被浏览器解析。 我的疑问是,为什么在模板呈现后JavaScript脚本标记不能被JavaScript解析器执行。 当我通过Chrome Inspector检查时,脚本标记存在于内容中,但未由Javascript分析。 这种行为是否有任何特定的原因。

链接地址: http://www.djcxy.com/p/73463.html

上一篇: <script> tag not executed in Handlebars template even with triple braces

下一篇: How can I use templates outside of the render pipeline