我是一个初学者。我试图在我的第一个项目中添加引导,但它没有出现在下面的开发人员工具的头部部分。这是我的angularjson代码。提前谢谢。
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/my-first-project",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.css",
"src/styles.css"
],
"scripts": [
"node_modules/bootstrap/dist/js/bootstrap.js"
]
在Angular中使用bootstrap的步骤。
-
安装引导
npm install bootstrap --save
Understyles array进口bootstrap.min.css
"node_modules/bootstrap/dist/css/bootstrap.min.css"
Underscripts array进口bootstrap.bundle.min.js因为popper.js包含在bootstrap.bundle.js文件中。如果导入bootstrap.js这时你必须导入popper.js在bootstrap.js有关更多信息,请查看Bootstrap文档
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js"
在<<li>strong> angular.json 文件