How to use bootstrap 4 in angular 2?

后端 未结 11 2583
有刺的猬
有刺的猬 2020-11-30 18:54

I\'m building an angular 2 app written in typescript. It would use the bootstrap 4 framework in combination with some custom theming, is this possible?

The \"ng2-boo

11条回答
  •  感动是毒
    2020-11-30 19:29

    Adding Bootstrap using Angular CLI:

    step 1. npm i bootstrap@latest --save 
    step 2. open angular.json and then add bootstrap:
     "styles": [
          "node_modules/bootstrap/dist/css/bootstrap.min.css",
          "src/styles.scss"
        ]
    step 3. restart the server to see the changes
            ng serve 
    

提交回复
热议问题