Angular5 + bootstrap
2018-04-13 本文已影响30人
readilen
npm config set registry https://registry.npm.taobao.org
npm install -g @angular/cli
ng new my-awesome-project
cd my-awesome-project
npm install popper.js --save
npm install jquery --save
npm install bootstrap --save
Open .angular-cli.json file and update script section as follows:
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"
],
Finally, open src\styles.css and add:
@import "~bootstrap/dist/css/bootstrap.css";