angular6的文件目录不同于ng4,按照学习视频中的方法样式没有生效,需要修改文件angular.json,找到第一个"styles,在其中添加上如下的位置信息
"styles": [
"src/styles.css",
"node_modules/bootstrap/dist/css/bootstrap.css"
],
"scripts": [
"node_modules/jquery/dist/jquery.js",
"node_modules/bootstrap/dist/js/bootstrap.js"
],
最后,一定要记得重启,配置才能生效
新手问题angular6配置CSS&jquery不生效
最新推荐文章于 2021-09-03 12:49:16 发布