Currently I'm using Windows10 and WSL2 with Ubuntu 20.04 for developing. For the most case this works excellent, apart from one problem. There seems to be something broken in the networking layer between Windows/WSL2. When serving angular using 'ng serve', I can't access it from Windows.
Only when using the terminal in VS Code, and opening the browser from the link in the terminal output, will Windows open it – however, it does not open 'localhost:4200', it opens 127.0.0.1:'random port' which is not allowed by our proxy, which means the angular application will show up but not be usable. After doing this, the application is available from localhost:4201 – but never before opening it from VS Code. This means I cannot use other terminals (like the new Windows Terminal or ConEmu) to start the applications.
As far as I can tell this is a Windows-problem rather than a problem with the Linux-installation itself, but I have not found a way to 'reinstall' the Windows-part of WSL2 without losing all data on the Linux-installation. Any pointers would be appreciated.