【发布时间】:2017-04-30 11:28:08
【问题描述】:
我刚刚使用 ng new myapp 创建了一个新的 angular2 应用程序,并且在 index.html 中加载样式时出现错误。我只是在 index.html 中添加了一行:
<link rel="stylesheet" href="./css/styles.css">
当然,我在 src/css/styles.css 中添加了一个文件夹和文件。 而在 chrome 中结果显示
localhost/:8 GET http://localhost:4200/css/styles.css 红色(状态 = 404) 未找到。
知道错误是什么吗?
当在编辑器中点击 ctrl + follow 链接时,我得到了 css 文件。
【问题讨论】:
标签: angular angular-cli