Home  >  Article  >  Web Front-end  >  Detailed explanation of the steps to use less in angular 6

Detailed explanation of the steps to use less in angular 6

php中世界最好的语言
php中世界最好的语言Original
2018-05-22 09:51:172720browse

This time I will bring you a detailed explanation of the steps for using less in angular 6. What are the precautions for using less in angular 6? The following is a practical case, let's take a look.

New project

ng new<a href="http://www.php.cn/wiki/165.html" target="_blank"> [appname] --style less</a>

Existing project

Modify the *.css file and

reference with the suffix less and set the following content in the angular.json file

{
 "$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"
    }
   }
 ......
}
I believe you have mastered it after reading the case in this article For more exciting methods, please pay attention to other related articles on the php Chinese website!

Recommended reading:

Detailed explanation of the steps to change the project port number in nodejs

node builds the server, writes the interface, and adjusts the interface. Detailed explanation of cross-domain methods

The above is the detailed content of Detailed explanation of the steps to use less in angular 6. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn