我使用以下命令创建了一个新的Angular应用:
ng new ...
我可以使用以下方式查看应用程序:
ng serve --open
我移除了默认的src/favicon.ico
,并将其替换为src/favicon.png
。我还打开了src/index.html
,并将相应的行更改为:
<link rel="icon" type="image/png" href="favicon.png">
这似乎没有起作用。请求 /favicon.png
的 GET 请求仅返回来自 src/index.html
的内容。重新启动 ng serve
没有任何不同。
我该如何使应用程序能够访问此文件?