html内容移至shell.html时未显示div内容 [英] div content not showing when html code moved to shell.html
问题描述
我已经从网站上下载了模板:
I have downloaded a template from site:
http://www.mosaicpro.biz/item/coral-app-website-startup-kit-18.html
我正在尝试将其集成到Durandal中:
I am trying to integrate this into Durandal:
当我将html内容保留在文件中时:Durandal-> index.cshtml,一切正常完美。但是,当我将div内容移动到shell.html时,所有内容都显示为空白,屏幕上什么也没有显示。
when i keep the html content inside the file: Durandal->index.cshtml, everything works perfectly. But when i move the div content to shell.html, everything is shown as blank, nothing appears on the screen.
我可以看到shell.js的激活方法触发并控制台中没有错误。激活中也没有代码隐藏任何内容。
i can see activate method of shell.js firing and there is no error in console. Also there is no code in activate which is hiding any content.
有人遇到过durandal这类问题吗?
Has anyone faced any such issue with durandal?
推荐答案
我的代码如下-> index.html
My code is like below-> index.html
<html>
<div>some div content from template<div>
<script data-main="MyMainSPAPagePath/main" src="Scripts/require.js"></script>
<script>some app specific scripts</script>
</html>
但是当我将div移到shell.html时,即仅删除div部分
but when i move the div to shell.html i.e remove only div part
index.html->
index.html->
<html>
<script data-main="MyMainSPAPagePath/main" src="Scripts/require.js"></script>
<script>some app specific scripts</script>
</html>
shell.html->
shell.html->
<div>some div content from template<div>
页面变为空白。
i可以看到shell触发的激活方法,并且所有路由都已正确配置。
i can see activate method of shell firing and all routes are properly configured.
这篇关于html内容移至shell.html时未显示div内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!