简体   繁体   English

# 在 gcloud 上部署后出现在 url 上

[英]# appears on url after deploy on gcloud

I recently deployed an app on google cloud using app engine and when visitin http://myapp.domain.com/ a # appears before any of my routes in angular, something like this:我最近使用应用程序引擎在谷歌云上部署了一个应用程序,当访问http://myapp.domain.com/时,我在 angular 中的任何路由之前都会出现# ,如下所示:

http://myapp.domain.com/#/dashboard

This is what my app.yaml currently has:这是我的 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

Just so this question can be closed successfully: solution is to remove {useHash: true} from RouterModule config.这样这个问题就可以成功关闭:解决方案是从 RouterModule 配置中删除{useHash: true}

暂无
暂无

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

相关问题 gcloud deploy 永远不会完成更新服务 - gcloud deploy never finish with Updating service gcloud app部署错误需要“vpcaccess.connectors.use”权限 - gcloud app deploy eror The "vpcaccess.connectors.use" permission is required 为什么 gcloud app deploy 将 0 个文件上传到谷歌云存储? - Why is gcloud app deploy uploading 0 files to google cloud storage? gcloud app deploy error too many files under.cache - gcloud app deploy error too many files under .cache gcloud app deploy:此部署文件过多 - gcloud app deploy : This deployment has too many files API 网关 URL(端点 ID)在“sls deploy”后更改,端点未出现在 API 网关中 - API Gateway URL (endpoint id) Changed after “sls deploy” and endpoint is not appearing in API Gateway `gcloud run deploy` 引发“修订<revision_name>还没有准备好,无法为交通服务。”</revision_name> - `gcloud run deploy` raises "Revision <revision_name> is not ready and cannot serve traffic." gcloud.app.deploy 错误响应:[13] 无法创建云构建:无效存储桶 - 如何修复? - gcloud.app.deploy Error Response: [13] Failed to create cloud build: invalid bucket - how to fix? 为什么运行`gcloud run deploy`,完全按照教程,报错“image must be specified” - Why does running `gcloud run deploy`, exactly according to the tutorial, give the error "image must be specified" gcloud 应用程序引擎实例在一段时间后处于非活动状态 - gcloud app engine instances being inactive after a while
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM