Auto-redirect connection to port 4201 and fail

Jocadi 1 Reputation point
2021-09-28T23:30:02.84+00:00

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.
1,034 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,370 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AlexZhu-MSFT 5,956 Reputation points Microsoft Vendor
    2021-09-29T08:09:26.76+00:00

    Hi,

    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
    https://angular.io/resources?category=community

    DEV Community
    https://dev.to/t/angular

    136241-angular-application.png

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

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.