这次给大家带来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"
    }
   }
 ......
}
登录后复制

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

推荐阅读:

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

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

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

09-06 18:52