Auto-redirect connection to port 4201 and fail

Jocadi 1 Reputation point

I am creating a website with Angular on WSL2 Ubuntu running on a Windows 10 computer.
When I launch the application with the ng serve command, I get ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** and ✔ Compiled successfully. on the command line.
But when I click on the link, the connection is redirected to http://localhost:4201/ and it fails. By changing 4201 to 4200 in the browser address field, the desired page is displayed.
I did some research without finding any mention of an exactly similar problem, but I nevertheless saw that the easiest way to fix it was to run the ng serve —port 4201 command. It does work, but obviously not anymore when I replace 4201 with 4200 in the browser address field.

I can probably settle for this solution, but I nevertheless want to report this bug for correction.

Microsoft System Center
Microsoft System Center
A suite of Microsoft systems management products that offer solutions for managing datacenter resources, private clouds, and client devices.
435 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,046 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AlexZhu-MSFT 3,711 Reputation points Microsoft Vendor


    Angular may be very happy seeing your bug report for the product improvement. However, Microsoft Q&A is not covering non-Microsoft products. If possible, you may visit Angular comminuty to fire up a ticket so that the incorrect link issue will be fixed soon by their developer.

    Augular resources

    DEV Community


    If the response is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments