If you use ng serve with the parameter –ssl true, to serve your Angular application.
It will generate a self-signed https certificate, so you can run the Angular application on localhost using HTTPS.
By default this certificate is NOT trusted by your browser, so you will get a red cross, left to the url.
Because this certificate is not trusted, you might get multiple WDS disconnect errors in the chrome developer tools console.
Sometimes ending in a never-ending loop.
If you want to trust the self-signed https certificate:
- click on the red cross (a popup opens)
- choose Certificate
- Click on Details
- Click on Copy to file
Press next
Choose DER encoded binary X.509 (.CER)
Enter C:\Temp\localhost.cer
Press Finish
Go to C:\Temp with the explorer and double click on the localhost.cer file.
Press Install Certificate…
Choose “Local Machine” if you want the certificate be trusted for all user of this computer.
To remove the certificate on Windows 10
- Open Start, type certmgr.msc
- Click on “Trusted Root Certification Authorities” > Certificates
- Right click on localhost and choose Delete