$ default和default有什么区别?

时间:2019-01-22 20:14:11

标签: angular angular-cli

我正在阅读angular-cli源代码,并遇到schema.json,它同时具有$defaultdefault字段的某些属性,例如

"project": {
  "type": "string",
  "description": "The name of the project.",
  "$default": {
    "$source": "projectName"
  }
},
"inlineStyle": {
  "description": "When true, includes styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.",
  "type": "boolean",
  "default": false,
  "alias": "s"
}

那么在每个属性中使用$defaultdefault的目的是什么? $default是对象,default是基本类型吗?还是其他原因?

0 个答案:

没有答案