Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/EmptyTag/140.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
指定angular-cli.json中样式的顺序_Angular_Angular Cli - Fatal编程技术网

指定angular-cli.json中样式的顺序

指定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 2使用第三方库。在
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启动”服务器