-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load the assets just in the required Component #19
Comments
I managed to get rid of the assets (CSS) in the following way:
Now that you have the slick node module in your project, you can get rid of the in the index.html and import the SCSS from the module, taking care of the static assets, which you will need to copy somewhere in your project tree, and redefine the variables that point to them. This is how I configured an index.scss which is imported as well from the global styles.scss of my project:
On the other hand, I would like to have that already configured in the ngx-slick module, and also get rid of the imports of jquery.js and slick.js in the index.html which look rather ugly. |
I find another approach, just modifying .angular-cli.json (if your project uses it). These lines tell webpack to add the CSS and JS files to the bundle.
|
thanks @jguix you solved my problem with a good timing! =) |
No problem! |
Hi,
Is loading the jQuery and the slick slider CSS in the index.html the best way to load the assets? I was wondering if there is a way to load them just in the component where i am using the slider.
If i can help with this let me know and we could work toguether, if i know how to ;)
The text was updated successfully, but these errors were encountered: