10

I am trying to convert my html template into angular app. I have a css folder called plugins and img folder.

When I am adding :

 "styles": [
          "src/assets/plugins/listtyicons/style.css",
          "src/assets/plugins/jquery-ui/jquery-ui.min.css",
          "src/assets/plugins/bootstrap/css/bootstrap.min.css",
          "src/assets/plugins/plugins/isotope/isotope.min.css",
          "src/styles.css"

        ]

this code in angular.json file I am getting error when trying to start angular app. I have put my plugin folder inside assets folder. I am getting this error:

 ERROR in multi ./src/assets/plugins/listtyicons/style.css 
./src/assets/plugins/jquery-ui/jquery-ui.min.css ./src/assets/plugins/bootstrap/css/bootstrap.min.css ./src/assets/plugins/plugins/isotope/isotope.min.css ./src/styles.css
Module not found: Error: Can't resolve 
'/Users/nilay/angular/bes/src/assets/plugins/plugins/isotope/isotope.min.css' 
in '/Users/nilay/angular/bes'

I don't know why am I getting this error.

0

1 Answer 1

31

In angular 6 you have to add only in src/style.css (instead angular.json):

@import "assets/plugins/listtyicons/style.css";
@import "assets/plugins/jquery-ui/jquery-ui.min.css";
@import "assets/plugins/bootstrap/css/bootstrap.min.css";
@import  "assets/plugins/plugins/isotope/isotope.min.css";

And in angular.json

"styles": [
          "src/styles.css"
        ]
Sign up to request clarification or add additional context in comments.

6 Comments

tell me for more help
Where are the docs on this? Can you point me to them, please?
plugin is folder that the user create... but if you npm bootstrap , jquery the files in node.modukes folder
@לבנימלכה - could you please tell, how to include JS files?
like style you have "scripts" arr put there those links
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.