Chatra
Chatra

Reputation: 3139

Angular 4 and Bootstrap 4

I am trying to include Jquery and Bootstrap 4 in Angular CLI project.

This is the first time I am trying to integrate these two.

So, I installed Jquery, PopperJs and Bootstrap 4 and able to find these folders in Node module.

The issue is, when I refer these in the solution in Index.html page, styles are not working. If I comment out those and tried to add CDN Files as mentioned in this link

https://getbootstrap.com/

If I comment out node modules reference and put directly CDN reference it is working, another way is not.

Did I miss anything as part of Installation or references?

Upvotes: 0

Views: 109

Answers (1)

Andresson
Andresson

Reputation: 1307

You can add the style files in .angular-cli.json

The file is located here:

  • RootProjectFile
  • e2e
  • node_modules
  • src
  • .angular-cli.json

And then add it to the styles:

  "styles": [
    "../node_modules/..YourBootStrapStyle",
    "styles.scss"
  ],

Upvotes: 1

Related Questions