Overview
Hello all,
In last post we have seen what can be possibilities for single page application here
Today I have face very complex problem. Actually its a little one, but because of less documentation on the internet and no reference it was quite difficult to solve. But after some study of framework, I got the solution
I have created some demos with Durandal framework. Its having some different folder structure and some different configuration but with demo or starter kit of its, you will get to know its work with HTML and js very will but my requirement was, it should run with aspx page too. Means I want aspx page as view for that I could not find solution on internet and api documentation of the framework too.
But I have find solution
What I done is, I have made some changes in the framework itself It having one js file named viewEngine.js. The viewEngine module provides information to the view Locator module which is used to locate the view’s source file. The viewEngine also transforms a view id into a view instance.
It just parse the HTML and if it found any other file, then it use parseHTML function of jquery
but It take default extension as .html so I have change the default extension to .aspx so it will only render aspx pages.
Note: If you are following started kit of Durandal, and made changes as I mention above then you also need to change the file extension of shell.html to shell.aspx because by above changes it will just render aspx files not html files as view
Enjoy, Have a great day ahead