我想开发Angular 6应用程序,但在部署Firebase后只显示欢迎页面。
以下是我采取的步骤:
- 安装Firebase工具
- 在我的应用程序中运行
ng build --prod
- 运行
firebase init
- 你准备好继续吗?(Y/n)y
- (*) Hosting:配置和部署Firebase Hosting站点
- 您希望将什么作为公共目录?(public)dist
- 将其配置为单页应用程序(将所有url重写为/index.html)?(y/N)y
- 文件dist / index.html已存在。覆盖吗?(y/N)y
- Firebase初始化完成!
- 在这一步中,我删除了dist文件夹并再次运行了
ng build --prod
- angular将应用程序构建到位于
dist
文件夹内的子文件夹中,因此我将包含index.html的子目录中的全部内容复制到dist/
中。 - 运行
firebase deploy
- 运行
firebase open hosting:site
但即使我做了所有这些,链接中仍然只显示欢迎页面。
我做错了什么?