我有多个角度2组件,我在其中加载样式表:
@Component({
selector: 'rewards-component',
styleUrls: [
'../../assets/styles/old-web-styles/old-web-styles.component.scss',
'./rewards.component.scss'
],
templateUrl: './rewards.component.html'
})
./rewards.component.scss
加载正常,但../../assets/styles/old-web-styles/old-web-styles.component.scss
不会加载到我的任何组件中。我知道该文件正在被找到,因为如果我更改它的名称,它将抛出file not found error
。为什么这个样式表没有加载?
答案 0 :(得分:0)
路径只有错误。 检查它的确切位置并改变路径。
可能是'../assets/styles/old-web-styles/old-web-styles.component.scss'例如