在 .angular-cli.json中配置如下:
1 2 3 4 5 6 7 8 | "styles" : [ "../node_modules/.3.3.7@bootstrap/dist/css/bootstrap.css" , "styles.css" ], "scripts" : [ "../node_modules/jquery/dist/jquery.min.js" , "../node_modules/.3.3.7@bootstrap/dist/js/bootstrap.js" ], |
这种配置就可以识别到 bootstrap 的css样式
1 2 3 4 5 6 7 8 | "styles" : [ "../node_modules/bootstrap/dist/css/bootstrap.css" , "styles.css" ], "scripts" : [ "../node_modules/jquery/dist/jquery.min.js" , "../node_modules/bootstrap/dist/js/bootstrap.js" ], |
这个样子配置的就不可以!
希望老师帮忙解惑下!
Angular新特性,教你熟练使用 Angular 和 Typescript 开发组件式单页应用
了解课程