最新版本的Angular cli是否支持内联模板和组件的css?我再也看不到--inline-template选项了吗?
在angular-cli.json文件中,您可以指定是否希望文件具有内联css和模板.
您可以在此处找到可在配置文件中指定的所有选项.
https://github.com/angular/angular-cli/wiki/angular-cli
这样,当你使用ng generate component
它时将使用默认值.
{
"project": {
"version": "1.0.0-beta.22-1",
"name": "client"
},
"apps": [
{
"root": "src",
"outDir": "build",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
"tsconfig": "tsconfig.json",
"prefix": "ws",
"mobile": false,
"styles": [
"styles/main.scss"
],
"scripts": [],
"environments": {
"source": "environments/environment.ts",
"prod": "environments/environment.prod.ts",
"dev": "environments/environment.dev.ts"
}
}
],
"addons": [],
"packages": [],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "scss",
"prefixInterfaces": false,
"inline": {
"style": true, <<<--- CHECK IT OUT!!
"template": true
},
"spec": {
"class": false,
"component": true,
"directive": true,
"module": false,
"pipe": true,
"service": true
}
}
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3730 次 |
最近记录: |