我最近使用應用程式引擎在谷歌云上部署了一個應用程式,當訪問 http://myapp.domain.com/
a#出現在我的任何有角度的路由之前,如下所示:
http://myapp.domain.com/#/dashboard
這是我的 app.yaml 目前擁有的:
runtime: python27
api_version: 1
threadsafe: true
skip_files:
- ^(?!dist)
handlers:
- url: /
secure: always
static_files: dist/myapp/index.html
upload: dist/myapp/index.html
# Routing rules for resources, css, js, images etc. Any file with format filename.ext
- url: /(.*\.(. ))$
secure: always
static_files: dist/myapp/\1
upload: dist/myapp/(.*\.(. ))$
# Routing rule for Angular Routing
- url: /(.*)
secure: always
static_files: dist/myapp/index.html
upload: dist/myapp/index.html
uj5u.com熱心網友回復:
就這樣可以成功關閉這個問題:解決方案是{useHash: true}從 RouterModule 配置中洗掉。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/512610.html
標籤:Google Cloud Collective 有角度的谷歌应用引擎谷歌云平台路线
