One possible explanation for the error:
You get this behavior when you deploy your app into a subfolder, not directly on your base-URL.
What happens:
- The HTML is found when you go to
www.yourbase.com/yoursubfolder/index.html, but the angular app fetches resources with relative path (let’s say resource.css) fromwww.yourbase.com/resource.cssinstead of fromwww.yourbase.com/yoursubfolder/resource.css - your webserver probably serves some default page on
www.yourbase.com/resource.css(maybe yourwww.yourbase.com/index.html) - So the content of that default page is loaded instead of your CSS.
To fix it
Build your angular app with
ng build --prod --base-href yoursubfolder
Or set the base path in your index.html
<head>
<base href="/yoursubfolder/">
</head>