我正在使用引导表单助手jquery 插件来帮助用户选择一个国家并查看标志。
index.html
当我放置所需的 html 时,我有一个包含所有模板的 ember 应用程序
<div class="bfh-selectbox bfh-countries" data-country="RW" data-flags="true"></div>
进入索引文件,我得到适当的下拉菜单。
当我将相同的 html 放入模板中时,说“关于”
<script type="text/x-handlebars" data-template-name="about">
<h3>About</h3>
<p>This is a basic application using Ember.js on the client side</p>
<div class="bfh-selectbox bfh-countries" data-country="RW" data-flags="true"></div>
</script>
index.html#/about
当我通过单击链接直接访问时,代码不会显示。div 显示在控制台中,但样式不显示,它是不可见的。奇怪的是,当我刷新index.html#/about
国家选择器显示时。
如何让这个 div 始终显示?