当前位置: 移动技术网 > IT编程>脚本编程>AngularJs > 在angular 6中使用 less 的实例代码

在angular 6中使用 less 的实例代码

2018年05月19日  | 移动技术网IT编程  | 我要评论

新项目

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"
    }
   }
 ......
}

总结

以上所述是小编给大家介绍的在angular 6中使用 less 的实例代码,希望对大家有所帮助

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网