Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy Angular 6 app on Azure using Visual Studio 2017

I created an Angular app using angular-cli:

npm install -g @angular/cli

ng new my-app

Now I want to deploy this simple Angular app to Azure.

I have published setting how can I do it?

like image 477
Faisal Avatar asked Mar 02 '26 06:03

Faisal


2 Answers

After many hours of researching i found it and it is very simple

just follow the steps

  1. run ng build --prod (this will create a dist folder in your application)
  2. open visual studio and select open >> website select the path of your project inside dist folder and open
  3. then just right click on your project and select Publish Web App then select your published profile setting and deploy it
like image 196
Faisal Avatar answered Mar 04 '26 23:03

Faisal


VS Code

You can deploy your Angular App which is using angular-cli easily from Visual Studio Code(VS code)

Refer to this article (You just need to install the Azure App Service extension)

enter image description here

After you deployed the app,

enter image description here

Visual Studio 2017

You need to create a Project as (ASP.NET Core Web application) as Angular Project

enter image description here

enter image description here

After then you can publish your App as WebPackage Deployment to Azure.

Here is the Reference for Publishing your Angular App from VS 2017

I'd say you can use the Visual Studio Code for your use-Case rather than Visual Studio 2017

like image 37
Jayendran Avatar answered Mar 04 '26 22:03

Jayendran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!