Answer the question
In order to leave comments, you need to log in
Angular cli: how to add angularjs component styles to ngUpgrade hybrid project?
Welcome all!
Right now I'm busy translating to a hybrid angular/angularjs project. And I ran into a problem with importing styles.
For example, a simple angularJs component:
import template from './simple.html';
import controller from './simple.controller.js';
import './simple.less'; // <-- Look at
export const SimpleComponent = {
template,
controller
};
@Component({
selector: 'app-simple',
templateUrl: './simple.html'
styleUrls: ['./simple.less']
})
angular.json -> (путь) projects.projectName.architect.build.options.styles
"styles": [ "src/assets/styles/index.less" ]
@import './main/components/simple/simple.less';
@import './main/components/awesome-input/awesome-input.less';
@import './main/components/awesome-button/awesome-button.less';
@import './main/components/awesome-scroll/awesome-scroll.less';
...
angular.json -> (путь) projects.projectName.architect.build.options.styles
"styles": [ "src/app/app.less" ]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question