When I tried to run the "ng-serve" command again it gives me "Port 4200 is already in use."
What is Port Number and how problem araise ?
Actually port number is used to find particular application in a network.Sometimes two application tries to use the same port . Suppose Application A is using port XXXX then when another application say Application B try to use the same port number then above problem may araises. Here I am using port XXXX as Port 4200 .
So , in this method we have to kill the process running on this port and again reuse that port.So lets start
Step1: Open cmd and type as below
Here we can see Port 4200 is used by Process ID : 12868 as we have status as LISTENING so we must kill process running on this PID
Step2: Forcefully Killing Process ID 12868 as shown below
Step 3 : Now you can do "ng-serve" to start your angular app at the same port 4200
Try using another port to serve current angular project .
ng serve --port 12012
Here I have specified port number 12012. But this is not best practice because here each time i am doing ng serve I have to use different case. So this is just alternative solution but don't use it.