This is what I have done for Angular 8.
After following the steps provided by @programoholic go to ./dist/index.html and remove type="module" attribute from all of the script tags.
Below is my working index.html file
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>StartApp</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
<script src="runtime-es2015.js"></script>
<script src="runtime-es5.js" nomodule defer></script>
<script src="polyfills-es5.js" nomodule defer></script>
<script src="polyfills-es2015.js"></script>
<script src="styles-es2015.js"></script>
<script src="styles-es5.js" nomodule defer></script>
<script src="vendor-es2015.js"></script>
<script src="vendor-es5.js" nomodule defer></script>
<script src="main-es2015.js"></script>
<script src="main-es5.js" nomodule defer></script>
</body>
</html>
Hope it helps