5

I have an Angular 5 application. I wonder if there is anyway to import bootstrap or any other library only for one module in Angular 5?

2
  • You want to add bootstrap file in one component only right? Commented Jun 4, 2019 at 11:55
  • well a component and all its child components Commented Jun 4, 2019 at 12:05

1 Answer 1

3

If you don't want to include bootstrap file globally in an angular project then you can import bootstrap file in a components CSS file. So in every component.css in which you need a bootstrap, there you can write like this on top of the file.

@import "~bootstrap/dist/css/bootstrap.css";
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.