Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/33.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.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
为什么我的风格没有加载angular4网页包站点_Angular_Webpack_Asp.net Core - Fatal编程技术网

为什么我的风格没有加载angular4网页包站点

为什么我的风格没有加载angular4网页包站点,angular,webpack,asp.net-core,Angular,Webpack,Asp.net Core,没有错误 我本以为这些样式最终会出现在vendor.css或 我的app.component.ts @Component({ selector: 'app', template: require('./app.component.html'), styles: [ "../../../../node_modules/primeng/resources/primeng.min.css", "../../../../node_modules/primeng/resources/th

没有错误

我本以为这些样式最终会出现在vendor.css或

我的app.component.ts

@Component({
selector: 'app',
template: require('./app.component.html'),
styles:
 [
    "../../../../node_modules/primeng/resources/primeng.min.css",
    "../../../../node_modules/primeng/resources/themes/south-street/theme.css",
    "../../../../node_modules/font-awesome/css/font-awesome.min.css",
    //...
],
})

我的网页相关行提到css:

  { test: /\.css$/, use: [ 'to-string-loader', isDevBuild ? 'css-loader' : 'css-loader?minimize' ] }

为什么加载样式表必须如此复杂?

您是否有
app.UseStaticFiles()
Startup.cs
中的配置方法中?它是微妙的,当它丢失时会让你发疯……它不是应该是
styleUrls[]
而不是
styles
没有styleUrls[]也不起作用吗。我只是在_Layout.cshtml中插入了老派链接,这太糟糕了。