指定angular-cli.json中样式的顺序
我正在为Angular 2使用第三方库。在指定angular-cli.json中样式的顺序,angular,angular-cli,Angular,Angular Cli,我正在为Angular 2使用第三方库。在angular cli-.json中,我加载的包如下所示: "packages": { ... "mydaterangepicker" :{ "map" : "node_modules/mydaterangepicker", "defaultExtension": "js" } 我想在这个包之后加载我的style.css,以便覆盖它的样式。我不知道怎么做,有
angular cli-.json
中,我加载的包如下所示:
"packages": {
...
"mydaterangepicker" :{
"map" : "node_modules/mydaterangepicker",
"defaultExtension": "js"
}
我想在这个包之后加载我的style.css,以便覆盖它的样式。我不知道怎么做,有没有人经历过类似的情况?下面是我目前的angular cli.json
:
{
"project": {
"version": "1.0.0-beta.19-3",
"name": "..."
},
"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": [
"styles.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": [],
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"addons": [],
"packages": {
"moment": {
"map": "node_modules/moment/moment.js",
"type": "cjs",
"defaultExtension": "js"
},
"mydaterangepicker" :{
"map" : "node_modules/mydaterangepicker",
"defaultExtension": "js"
}
},
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"prefixInterfaces": false,
"inline": {
"style": false,
"template": false
},
"spec": {
"class": false,
"component": true,
"directive": true,
"module": false,
"pipe": true,
"service": true
}
}
}
我在CLI v1.0.0-beta.26上遇到了相同的问题。我把“styles.css”放在我的文件列表的最后,它成功了。捆绑时一定有一些潜在的订单要求…我必须重新启动“npm启动”服务器