简体   繁体   English

如何从index.html加载我的Aurelia应用,该索引与应用的其余部分不在同一文件夹中?

[英]How can I load my Aurelia app from an index.html which is not located in the same folder as the rest of the application?

How can I load my app from an index.html which is not located in the same folder as the rest of the application? 如何从index.html加载应用程序,该index.html与应用程序的其余部分不在同一文件夹中?

I'm currently using jspm (which I'm new to). 我目前正在使用jspm (这是我的新手)。 I'm trying to integrate Aurelia with web2py (Python web framework). 我正在尝试将Aureliaweb2py (Python Web框架)集成。

My index.html in accessible via 我的index.html可通过访问

http://websiteaddress.com/myapp/default/index.html

and may later be accessible via 以后可以通过以下方式访问

http://websiteaddress.com/myapp/index.html

but the code of my Aurelia app is accessible from 但可以从以下位置访问我的Aurelia应用程序的代码

http://websiteaddress.com/myapp/static/aurelia_app/

On the disk the index.html file is at 在磁盘上, index.html文件位于

/web2py/applications/myapp/views/default/index.html

and the Aurelia app folder is at Aurelia应用程序文件夹位于

/web2py/applications/myapp/static/aurelia_app

You need to use the web2py pattern router , something like this in the router definition should work: 您需要使用web2py模式路由器 ,路由器定义中的类似内容应该可以工作:

routes_in = (
  ('/appname/default/index', '/appname/static/aurelia_app/index.html'),
  ('/appname/default/jspm_packages/$anything', '/appname/static/aurelia_app/jspm_packages/$anything'),
)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SailsJS无法访问资产/应用中的index.html - SailsJS can't access index.html located in assets/app 如何将 index.html 文件中的变量加载到 results.html 文件中? - How can I load a variable from a index.html file to a results.html file? 如何将index.html中的内容放入我的view.html? - How can I put content from my index.html into my view.html? 如何将单独的 html 页面加载到我的主 index.html 中? 我想可以通过使用 jquery 选择元素 id 来完成 - How can I load a separate html page into my main index.html? I imagine it can be done by selecting an element id with jquery 如何将我的 Index.html 中的按钮连接到我的 Unity 代码 - How can i connect Buttons from my Index.html to my Unity Code 如何在不使用XMLHttpRequest()的情况下读取与index.html位于同一目录中的文本文件<input type=“file” id=“fileToLoad”> - How do I read a text file located in the same directory as my index.html using XMLHttpRequest() without using <input type=“file” id=“fileToLoad”> Reactjs 我如何使用 Typescript 将道具从 index.html 传递到 App 组件 - Reactjs How i can pass props from index.html to App component with Typescript 如何使用Javascript将流数据(已转换为颜色的数据)不断地推送到index.html中的连续div中? - How can I push constantly streaming data (which I have converted to color) into successive divs in my index.html using Javascript? .js和.html不在同一文件夹中时,如何在Aurelia中创建自定义元素? - How can I create a custom element in Aurelia when the .js and .html are not in the same folder? 在Phonegap应用程序中动态加载index.html - Dynamically load index.html in Phonegap Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM