[英]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). 我正在尝试将
Aurelia
与web2py
(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.