index.html not loading local CSS

Viewed 16839

I have lately started using AngularCLI. I had transferred all my files from Angular2 to AngularCLI project.

But It is not loading some local css file but it is loading other css files?

Current Directory is:

-src
--index
--styles.css
--app
---angular2-fullcalendar
----fullcalendar.min.css

index.html

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Cudyangularcli</title>
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
  <link rel="stylesheet" type="text/css" href="styles.css">
  <link rel="stylesheet" type="text/css" href="../src/app/angular2-fullcalendar/fullcalendar.min.css" >
</head>
<body>
  <app-root>Loading...</app-root>
</body>
</html>

error is: enter image description here

3 Answers

Basically by default the path for styles.css is specified in angular-cli.json.So you don't need to call inside index.html.It will load automatically. "styles": ["styles.css",].If you have any other css files.specify this here.And add path as href="../path".

Related