I solved this problem in accordance with the figure as mentioned below:
run in cmd
npm install -g @angular/cli
Afterwhich:-
Open in Windows 10) Control Panel\All Control Panel Items\System or accordance with the figure
Step 1:
step 2 :
Step3:
Step4:
Step 5: Include the missing ng path
Mentioned below is a new environment variable that you need add:
C:\Users\PK\AppData\Roaming\npm\node_modules\@angular\cli\bin
To conclude, please restart all opened command prompts and try again.