如何使用ember-cli的图标? [英] How to use a favicon with ember-cli?
问题描述
我有一个在我的索引模板上工作了一段时间的图标,但没有任何其他模板,现在甚至我的索引模板都不会显示。
I had a favicon working for a while on my index template, but not any any other template, and now even my index template won't show it.
我正在开发中,所以我使用 ember服务器
。
I'm just in development, so I'm using ember server
.
index.html
< link rel =iconhref =favicon.ico>
index.html
<link rel="icon" href="favicon.ico">
在我的图标周围,看看它是否显示在任何地方,我现在有以下位置:
app /
public /
public / assets
Just throwing around my favicon to see if it shows up anywhere, I now have it in the following locations:
app/
public/
public/assets
我认为这应该很简单,特别是因为索引页没有改变,只是将新东西加载到销售点,所以我不知道为什么找不到我的favicon文件。
I think this should be very straightforward, especially since the index page doesn't change, just get's new stuff loaded into its outlets, so I can't figure out why it can't find my favicon file.
运行 ember服务器
,其中实际上是 /
根指向?
When running ember server
, where actually is the /
root pointing to?
推荐答案
如果您可以将图标文件保存在 public / assets /
中,您可以这样引用:
If you keep the favicon file in public/assets/
you can reference it like this:
< link rel =iconhref =/ assets / favicon.ico>
这篇关于如何使用ember-cli的图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!