【发布时间】:2017-02-18 01:04:29
【问题描述】:
这个问题与How do I make Angular 2 routing work with App Engine on page refresh? 非常相似,但我没有足够的评论点数,而且它说不要在答案中提出问题。
除了它是appspot上的静态托管站点,使用了angular cli dist文件夹之外,其他问题都是一样的:
Project
|
+--dist
|
+--index.html
+--inline.js
+--inline.map
+--main.bundle.js
+--main.map
+--styles.bundle.js
+--styles.map
+--app.yaml
+--index.yaml
我尝试将我的 app.yaml 更改为类似于上面链接的 Dan 的答案,但无法解决?这是 app.yaml 文件:
application:
version:
runtime: python27
threadsafe: true
api_version: 1
handlers:
- url: /(.*\.js)
static_files: dist/\1
upload: dist/(.*\.js)
- url: /(.*\.map)
mime_type: application/octet-stream
static_files: dist/\1
upload: dist/(.*\.map)
- url: /
static_files: dist/index.html
upload: dist/index.html
- url: /(.*)
static_files: dist/\1
upload: dist/(.*)
谢谢
【问题讨论】: