html内容移至shell.html时未显示div内容 [英] div content not showing when html code moved to shell.html

查看:86
本文介绍了html内容移至shell.html时未显示div内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从网站上下载了模板:

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆