I wanted to re-use some structure from an Angular 5 project which uses Less. In this old project I could simply load .less
files using this line from within a compo
In angular 6 you have to import
all files to main(in your case src/styles.less
) css file :
In angular.json
put ONLY:
"styles": [
"src/styles.less"
]
In styles.less
(import all files you want with /
before app
):
@import './app/shared/less/bootstrap.less';
See my answer to css here:Angular 6 load css folders in angular.json
To your edit ./src/app..
:
@import './src/app/...'