欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

angular 6中使用less步骤详解

程序员文章站 2022-03-31 17:42:21
...
这次给大家带来angular 6中使用 less步骤详解,angular6中使用less的注意事项有哪些,下面就是实战案例,一起来看一下。

新项目

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

相信看了本文案例你已经掌握了方法,更多精彩请关注其它相关文章!

推荐阅读:

nodejs更改项目端口号步骤详解

node搭建服务器,写接口,调接口,跨域方法详解

以上就是angular 6中使用less步骤详解的详细内容,更多请关注其它相关文章!

相关标签: angular less sass