Anirudh J
Anirudh J

Reputation: 11

Could not find stylesheet file 'css/style.css' linked from the template. Got this error while interfacing bootstrap with Angular

<link rel="stylesheet" href="plugins/bootstrap/bootstrap.min.css">

<link rel="stylesheet" href="plugins/owl-carousel/owl.carousel.css">
<link rel="stylesheet" href="plugins/magnific-popup/magnific-popup.css">
<link rel="stylesheet" href="css/style.css">

this is what the part of the code that throughs me the error just like for css I get error for all the plugins like bootstrap, owl-carousel, magnific-popup

Upvotes: 1

Views: 6769

Answers (1)

Cid Santos
Cid Santos

Reputation: 21

You can move all the CSS files to src/assets/css/ and then add these codes in angular.json

"styles": [
      "src/assets/css/style.css",
      "src/assets/css/plugins/owl-carousel/owl.carousel.css",
      "src/assets/css/plugins/magnific-popup/magnific-popup.css",
    ]

That could fix the problem.
Another solution could help: In your file login.component.ts add

  styleUrls: ['./login.component.css', './Your-Path/Your-File.css']

Upvotes: 1

Related Questions