When I run "ng serve" from WSL2 (Ubuntu 20.04), I am able to access the angular application from Windows 10 Host by browsing to http://localhost:4200.
Can someone explain how this is possible? I understand that WSL2 is working as a virtual machine with its own ip address. How can Windows 10 host access the angular app on WSL2 using "http://localhost:4200" ?
On a different note, when I run tomcat from WSL2, I am NOT able to access the tomcat application from Windows using "http://localhost:8080".
Thanks in advance Paul