5

I have already run

npm install bootstrap

and its located in the node_modules file, but I'm not seeing it link with my .html files. I know I can include the style sheets with the bootstrap url, but I'd rather set it up "right". Is there a certain file path I need to add to the index.html file, or something?

Thanks.

2
  • You need to reference both the JS and CSS files. You also need to reference 'bootstrap' rather than 'boostrap'. Commented Feb 21, 2018 at 1:19
  • Thanks for catching that! Oops! How would I reference the CSS files of bootstrap? Could you show me an example please? Commented Feb 21, 2018 at 1:21

1 Answer 1

3

to add bootstrap to your node project you have to type npm install --save bootstrap and it will run a little time and after installation you will see a bootstrap library in node_modules folder.

After you can set up bootstrap to your project. To do it you have to edit angular-cli.json file.Go into it and open inverted commas inside the square bracket under styles and type as this "../node_modules/bootstrap/dist/css/bootstrap.min.css" save it. Then start the server again by giving command ng serve. I hope you could be able to manage your issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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