将角度应用程序部署到Azure Web应用程序-但显示默认的Azure页面

问题描述:

我在Azure中创建了一个Web应用程序来托管角度应用程序. 我选择了以下运行时:

I created a Web App in Azure to host an angular application. I selected the runtime as bellow:

但是我的本地设置详细信息:

But my local setup details:

  1. 节点版本:v13.0.1
  2. 角度版本:8.2.11

我使用Anguler cli创建应用程序,然后运行build --prod创建dist. 然后,我尝试了以下方法将Angular应用程序部署到Web应用程序: 1.在VS Code中使用过的Azure App Service扩展 2.使用FileZilla和来自Web应用程序部署中心的ftp详细信息进行FTP.

I used Anguler cli to create the application and then I ran ng build --prod to create the dist. Then I tried following methods to deploy the Angular app to Web app: 1. Used Azure App Service extension in VS Code 2. FTP using FileZilla with the ftp details from the Web app's deployment center.

但是当我浏览URL时: https://eventzweb.azurewebsites.net/ 我在Angular应用程序中看到以下页面,但看不到我的页面.

But when I brows the url: https://eventzweb.azurewebsites.net/ I see the following page but not my page from the angular app.

知道为什么会这样吗?为什么我看不到我的页面?

Any idea why this is happening? Why I'm not seeing my page?

感谢您对高级的帮助.

Thank you for your help in advanced.

我通过以下方法解决了此问题:

I resolved this by:

  1. 通过将运行时"堆栈选择为ASP.NET V4.7,然后将操作系统选择为Windows来创建Web应用程序.
  2. 使用Azure DevOps部署有角度的应用程序.

步骤在此博客文章中: http://dot-net-box.blogspot.com/2020/01/deploy-angular-8-app-to-azure-with.html

The steps are in this blog post: http://dot-net-box.blogspot.com/2020/01/deploy-angular-8-app-to-azure-with.html