Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.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/7/css/35.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
Html 打底样式不适用于角度4_Html_Css_Angular_Primeng - Fatal编程技术网

Html 打底样式不适用于角度4

Html 打底样式不适用于角度4,html,css,angular,primeng,Html,Css,Angular,Primeng,我正在尝试使用Angular 4代码中的priming组件。模块已正确导入,但未应用样式 浏览器控制台显示404错误 我使用angular cli获取项目样板 我在index.html中包含了使用link标记的样式,如下所示: <link rel="stylesheet" href="/node_modules/font-awesome/css/font-awesome.min.css" /> <link href="/node_modules/primeng/resource

我正在尝试使用Angular 4代码中的
priming
组件。模块已正确导入,但未应用样式

浏览器控制台显示
404错误

我使用angular cli获取项目样板

我在index.html中包含了使用link标记的样式,如下所示:

<link rel="stylesheet" href="/node_modules/font-awesome/css/font-awesome.min.css" />
<link href="/node_modules/primeng/resources/themes/omega/theme.css" />
<link href="/node_modules/primeng/resources/primeng.min.css" />
"styles": [
    "styles.css",
    "../node_modules/primeng/resources/themes/omega/theme.css",
    "../node_modules/primeng/resources/primeng.min.css"
  ],

我还通过NPM下载了所需的软件包,并将它们集成到
package.json
文件中。

感谢大家提供可能的解决方案

我意外地找到了解决办法

我是Angular 4的新手,所以我不知道在通过npm安装新软件包之后,您必须重新启动服务器


当我重新启动我的webpack时,应用程序工作正常,启动也正常。

您确定angular-cli.json中的路径正确吗?确认css文件存在于您在cli中指定的任何路径中?您在项目中使用webpack吗?我可以知道你们项目中使用的Priming版本吗?