执行ng-serve时我意识到angular-cli正在注入我不需要的许多css,js文件?如何控制角度cls和css注射?
angular-cli.json config
{
"project": {
"version": "2.7.0",
"name": "cip_front"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "app",
"mobile": false,
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.css",
"../node_modules/font-awesome/css/font-awesome.css",
"../node_modules/ng2-toastr/bundles/ng2-toastr.min.css",
"../node_modules/ladda/dist/ladda-themeless.min.css",
"assets/styles/styles.css",
"styles.scss"
],
"scripts": [
"../node_modules/jquery/dist/jquery.js",
"../node_modules/metismenu/dist/metisMenu.js",
"../src/vendor/pace/pace.min.js",
"../node_modules/bootstrap/dist/js/bootstrap.js",
"../node_modules/chart.js/dist/Chart.bundle.min.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"addons": [
],
"packages": [
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"prefixInterfaces": false,
"inline": {
"style": false,
"template": false
},
"spec": {
"class": false,
"component": true,
"directive": true,
"module": false,
"pipe": true,
"service": true
}
}
}
注入但未提及的文件示例是ng2-smart-table
的scss样式