How to run the angular application i.e developed by using Angular CLI in VS2017?

162 views Asked by At

Am working ASP.NET Web Application with Angular 6. For this, I created a solution/project by taking an empty Web Application template in Visual Studio 2017. With the help of Angular CLI, I added the Angular files successfully to the ASP.NET Empty project and the project structure looks like:

Whenever I am trying to run the code from VS 2017, then the Application won’t load main.ts file it only displays index.html content. But whenever I am trying to run the code from command prompt by entering the command as ng serve, then the application should launched successfully and load the main.ts file as well as display the UI/UX design.

So, can anyone suggest me what is the problem when I run the above angular application from VS2017 it won’t load the main.ts file? But the same application will work from command prompt using ng serve command.

1

There are 1 answers

0
Md Wahid On
  • open cmd
  • change directory or folder using cd command like cd desktop to your project folder
  • put ng-serve on cmd and hit 'Enter'

OR

  • npm run ng serve use this command...