Firebase托管在部署angular 6应用程序后显示欢迎页面吗? [英] Firebase hosting showing welcome page after deploying angular 6 app?
本文介绍了Firebase托管在部署angular 6应用程序后显示欢迎页面吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想开发angular 6应用程序,但是在部署firebase之后仅显示欢迎页面.
I want to develop the angular 6 apps, but after deploying firebase showing only welcome page.
这是我已部署的步骤.
- 已安装firebase-tools
- ng build --prod(在我的应用中)
- firebase初始化
- 您准备好进行了吗? (是/否)y
- (*)托管:配置和部署Firebase托管站点
- 您要将什么用作公用目录? (公共)dist
- 配置为单页应用程序(将所有URL重写为/index.html)? (y/N)y
- 文件dist/index.html已经存在.覆盖? (y/N)y
- Firebase初始化完成!
- 在此步骤中,我已删除dist文件夹并再次运行
ng build --prod
在 - angular构建应用程序,因此我将包含index.html的子目录中的所有内容复制到了
dist/
. - firebase部署
- firebase开放主机:站点
dist
目录内的子文件夹中的- installed firebase-tools
- ng build --prod (in my app)
- firebase init
- Are you ready to proceed? (Y/n) y
- (*) Hosting: Configure and deploy Firebase Hosting sites
- What do you want to use as your public directory? (public) dist
- Configure as a single-page app (rewrite all urls to /index.html)? (y/N) y
- File dist/index.html already exists. Overwrite? (y/N) y
- Firebase initialization complete!
- In this step, I have deleted dist folder and run
ng build --prod
again - angular build app in a subfolder inside
dist
directory hence I copied all the content from the subdirectory which contains index.html todist/
. - firebase deploy
- firebase open hosting:site
但是做完所有这些之后,我仍然在链接中获得欢迎页面.
but after doing all that I am still getting welcome page in the link.
我在做什么错!!
推荐答案
尝试: 8.文件dist/index.html已经存在.覆盖? (y/N)N 并以隐身模式打开指向您应用的链接.严重的是,我坚持了几个小时,因为此Firebase索引已缓存在我的情况下,所以这就是为什么部署后看不到我的应用程序的原因.
Try: 8. File dist/index.html already exists. Overwrite? (y/N) N and open link to your app in incognito mode. Seriously, I stuck for hours because this firebase index got cached in my case, so this was the reason why I could't see my app after deploy.
这篇关于Firebase托管在部署angular 6应用程序后显示欢迎页面吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文