[英]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?
如何從index.html
加載應用程序,該index.html
與應用程序的其余部分不在同一文件夾中?
我目前正在使用jspm
(這是我的新手)。 我正在嘗試將Aurelia
與web2py
(Python Web框架)集成。
我的index.html
可通過訪問
http://websiteaddress.com/myapp/default/index.html
以后可以通過以下方式訪問
http://websiteaddress.com/myapp/index.html
但可以從以下位置訪問我的Aurelia
應用程序的代碼
http://websiteaddress.com/myapp/static/aurelia_app/
在磁盤上, index.html
文件位於
/web2py/applications/myapp/views/default/index.html
Aurelia
應用程序文件夾位於
/web2py/applications/myapp/static/aurelia_app
您需要使用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.