Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Angular2样式URL未正确加载_Javascript_Angular_Typescript - Fatal编程技术网

Javascript Angular2样式URL未正确加载

Javascript Angular2样式URL未正确加载,javascript,angular,typescript,Javascript,Angular,Typescript,我有多个angular 2组件,我在其中加载样式表,如下所示: @Component({ selector: 'rewards-component', styleUrls: [ '../../assets/styles/old-web-styles/old-web-styles.component.scss', './rewards.component.scss' ], templateUrl: './rewards.compone

我有多个angular 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
不会加载到我的任何组件中。但我知道该文件正在被找到,因为如果我更改其名称,它将抛出
文件未找到错误
。为什么不加载此样式表?

路径有错误。 检查它的实际位置并更改路径


例如,它可能是“../assets/styles/old web styles/old web styles.component.scss”

您找到这个问题的解决方案了吗?