Angular 动态样式URL 7
对于角7中的动态载荷样式,哪种方式更好 例如,我使用这种方式,但在版本7中不工作 此外,此代码在版本7中工作 帮帮我,谢谢Angular 动态样式URL 7,angular,typescript,less,angular7,Angular,Typescript,Less,Angular7,对于角7中的动态载荷样式,哪种方式更好 例如,我使用这种方式,但在版本7中不工作 此外,此代码在版本7中工作 帮帮我,谢谢 function theme(): string[] { // return ['./app.component.less'] >> not find return ['/app.component.less'] } @Component({ selector: 'app-root', templateUrl: './app.compon
function theme(): string[] {
// return ['./app.component.less'] >> not find
return ['/app.component.less']
}
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: theme()
})
您必须提供样式URL的链接。这里我更新你的代码。请仔细看看 有关更多详细信息,请访问给定链接
您必须提供样式URL的链接。这里我更新你的代码。请仔细看看 有关更多详细信息,请访问给定链接
请看这里:谢谢
function theme(): string[] {
// return ['./app.component.less'] >> not find
return ['/app.component.less']
}
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})