2

I use VS 2022 for VB.NET programming. Yesterday, I started the tutorial for Angular. Selected new project of type Standalone Typescript Angular Project. It added the startup files into the project. I then pressed F5 to run it. A command window opened with messages. Also, a Chrome window with the welcome page. I closed both of them and made one small change to the title text of app.component.html and tried running again. Now, the command prompt opens and gets stuck at "Complied successfully". Chrome doesn't open. The status bar at the bottom says "Deploy started".

Yes, I can manually open browser to http://localhost:4200 and see me change.

But, why is it stuck at this point?

enter image description here

Hussain Akbar
  • 646
  • 8
  • 25
  • `I closed both of them` This is not needed because Angular supports hot reloading. You can make changes to the code and have them reflected in the app on saving the files. – Cuzy Aug 10 '23 at 13:46

3 Answers3

2

It's not stuck at that point.

Running the program using VS 2022 will just launch a command prompt and perform the command "ng serve" in the root-folder to launch the angular application.

The first time it launched the command prompt and performed the. ng serve -o command (launch Angular app and open window). It can probably be changed in the settings.

Anyway It should have "hot-reloading" meaning it should reflect the changes to your program without restarting. (maybe it still needs to be turned on in the settings).

Lennert
  • 96
  • 1
  • 7
2

As others have stated, this is intended for ng serve. Live reloading should detect saved changes and reload the page if the change compiles successfully. If you have a compilation error, you'll see it in that window as well :)

If you want to disable auto reloading look at this post: Angular cli - how to disable auto reload when ng serve

charles
  • 23
  • 4
1

Now, the command prompt opens and gets stuck at "Complied successfully". Chrome doesn't open. The status bar at the bottom says "Deploy started".

This is not "stuck". It is behaving exactly as designed. Every change you make you will see reflected in the command prompt window. It will build your changes and let you know whether it compiled successfully each time you make and save a change in your angular application.

You do not have to close your window! You can simply refresh your page. (P.S.: In your dev tools on chrome, make sure to "disable cache" if you are making changes to things that are cached.)

You are on the exact right track!

Corey Sutton
  • 767
  • 5
  • 19