时间:2021-07-01 10:21:17 帮助过:4人阅读
新项目
ng new [appname] --style less
已有的项目
修改 *.css 文件及引用处后缀名为 less并在 angular.json 文件中设置以下内容
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ngTest": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "less"
}
}
......
}相信看了本文案例你已经掌握了方法,更多精彩请关注Gxl网其它相关文章!
推荐阅读:
nodejs更改项目端口号步骤详解
node搭建服务器,写接口,调接口,跨域方法详解
以上就是angular 6中使用less步骤详解的详细内容,更多请关注Gxl网其它相关文章!