在 Angular 应用程序中导航其他页面时,IE 图标消失 [英] IE favicon disappeared when navigating other page in angular application

查看:27
本文介绍了在 Angular 应用程序中导航其他页面时,IE 图标消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现 angular 应用程序存在问题.我有一个位置提供程序设置来使用 html5Mode true:

I found an issue with angular application. I have a the location provider setup to use the html5Mode true:

$locationProvider.html5Mode(true);

我注意到在页面之间导航时图标消失了.我使用的是 IE11 边缘文档模式.

I noticed that the favicon is disappearing when navigating between pages. I'm using IE11 edge document mode.

有人也碰到过吗?

谢谢

推荐答案

认为可能值得在此处添加我的发现...

Thought it might be worth adding my findings here...

起初我遇到了完全相同的问题,从根主页更改时,我无法让图标停留在页面上.我尝试了 Shaun 的答案,但也没有奏效,所以我在网上多看了一点,发现在所有现代浏览器中,您都可以使用 PNG 作为默认图标,所以我尝试了这一点,并且在最新的 Chrome、最新的 Firefox 中对我有用和 IE11 通过本地主机,然后在 Edge 中发布到我的网络服务器.

At first I had the exact same problem, I couldn't get the favicon to stay on the page when changing from the root home page. I tried Shaun's answer and that didn't work either so I looked online a bit more and found that in all modern browsers you are able to use PNGs as your default favicon so I tried that and it worked for me in latest Chrome, latest Firefox and IE11 via localhost and then in Edge once I published to my webserver.

我希望这能帮助其他遇到同样问题的人.

I hope this helps anyone else out that was having the same issue.

这篇关于在 Angular 应用程序中导航其他页面时,IE 图标消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆