angular - 角度 Firebase 托管不起作用
问题描述
我正在按照本教程构建 Angular 应用程序。我在 firebase 上创建了项目并成功部署了它。
i deploying hosting
i hosting: preparing dist/test-app directory for upload...
+ hosting: 7 files uploaded successfully
- Deploy complete!
Project Console: https://console.firebase.google.com/project/test-app-38199/overview
Hosting URL: https://test-app-38199.firebaseapp.com
我的 firebase.json 是这样的:
{
"hosting": {
"public": "dist/test-app",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
但是在我的浏览器中,我看到的是:
解决方案
我遇到了类似的问题,Angular 应用程序不再与 Firebase 兼容。我可以在其他任何地方托管我的 Angular 应用程序并且它运行良好,但是当部署到公用文件夹时,该应用程序将无法运行。就好像 Google 故意禁用 Angular 一样。
推荐阅读
- powershell - Powershell 从 PsCustomObject 获取价值
- javascript - 根据另一个下拉列表更改下拉选择值?
- twilio - Twilio 可编程视频 API - 房间创建
- c - 如何制作一个链表数组,其列表指向C中的矩阵行?
- javascript - 笑话测试文件中未定义的模块导入
- ios - iOS 14 在重新排序 UICollectionViewCell 时崩溃
- kubernetes - Kustomize 中的 patch 与 patchJson6902 有什么区别
- java - java中多个线程如何共享同一个对象
- microsoft-graph-api - 图形服务问题?
- laravel - Laravel:使用 Redis 集群时如何缓存:清除应用程序?