使用durandal JS与aspx页面 [英] use durandal JS with aspx page
本文介绍了使用durandal JS与aspx页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是durandal JS的新手。我已经完成了一些演示。我创建了html和一些js。
它运行正常。但是当我用aspx替换html然后它显示错误并且运行不好。可以解决的是什么?
编辑(移动评论)
< pre lang =text>错误是:查看未找到。
通过路径 text搜索
。它不会再找了,因为我没有 home
! home.html的 html
文件,而是我有 home.aspx
file
当用户点击 home
时,我想运行 aspx
文件。
解决方案
是的,最终我得到了解决方案
1)转到\lib \ durandal \ js \ viewEngine.js
2)有一个属性
viewExtension:'。html'
*查看源文件所需的文件扩展名。
* @property {string} viewExtension
* @default .html
3)将此设置为
viewExtension:'。aspx'
工作
I am new for durandal JS. I have gone through some demos.I have created html and some js.
It works fine. but when I replace html with aspx then it shows error and dont run well. What can be the solution ?
Edit (Moved comment)
error is :View Not Found.
Searched for "home
" via path "text!home.html
". It wont get find any more because I don't have html
file instead I have home.aspx
file
I want to run that aspx
file when user click on home
.
解决方案
Yes, and finaly I have got the solution
1) go to \lib\durandal\js\viewEngine.js
2) there is one property
viewExtension: '.html'
* The file extension that view source files are expected to have.
* @property {string} viewExtension
* @default .html
3) set this to
viewExtension: '.aspx'
It works
这篇关于使用durandal JS与aspx页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文