我想在Angular项目上运行我的引导程序,但是在angular.json中,我的脚本和样式不起作用
我尝试了从文件夹复制路径,但它给了我错误提示!
"styles": [
"C:\AngularCalismalar\intro\node_modules\bootstrap\dist\css\bootstrap.min.css"
],
"scripts": [
"C:\AngularCalismalar\intro\node_modules\jquery\dist\jquery.min.js",
"C:\AngularCalismalar\intro\node_modules\bootstrap\dist\js\bootstrap.min.js"
]
答案 0 :(得分:1)
不要使用物理路径,请添加相对路径。
尝试这样:
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.css"
],
"scripts": [
"./node_modules/jquery/dist/jquery.js",
"./node_modules/bootstrap/dist/js/bootstrap.js",
]