Error GET files css or js: 404 Not Found

Remove that link to your stylesheet from your index.html. You’re using the angular-cli and in your configuration, styles.css is being included by the angular-cli. Your link tag in the HTML isn’t doing anything.

(The angular cli is also dynamically injecting a link tag for that style into your html, which is why ‘it works’).

I modified my angular-cli.json :

“apps”: [
“root”: “src”,
“outDir”: “dist”,
“assets”: [
“index”: “index.html”,
“main”: “main.ts”,
“polyfills”: “polyfills.ts”,
“test”: “test.ts”,
“tsconfig”: “”,
“testTsconfig”: “tsconfig.spec.json”,
“prefix”: “app”,
“styles”: [
“scripts”: [],
“environmentSource”: “environments/environment.ts”,
“environments”: {
“dev”: “environments/environment.ts”,
“prod”: “environments/”

Leave a Reply