javascript - Angular 2 的 IE 10/11 和 Edge Shim

标签 javascript internet-explorer angular bootstrapping microsoft-edge

当运行 Angular2 应用程序时,我收到一条错误消息,指出该页面以文档 5 模式为目标,并且某些功能不可用。 IE 和 Edge for Angular2 需要哪些垫片?我在 IE 11 上,同样的页面也不适用于 Edge。

enter image description here

最佳答案

这可能与 Shims 或 Angular2 无关。如果您的页面在 IE/Edge 中以 Document 5 模式呈现,则页面可能未正确定义文档类型。

要解决,请确保您具有以下 doctype 指令:

<!DOCTYPE html>

然后从您的浏览器检查您的文档模式:

enter image description here

更多信息:

https://msdn.microsoft.com/en-us/hh779632.aspx

关于javascript - Angular 2 的 IE 10/11 和 Edge Shim,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38673927/

相关文章:

javascript - 了解mapStateToProps

javascript - IE trim $.ajax() 的 responseText!

angular - 如何以 Angular 安装图像上传模块

javascript - 通过添加一些数据属性来防止特定 dom 的 Bootstrap

javascript - bootstrap 4 验证密码确认和提交禁用,直到表单验证(注册表单)

javascript - IE、chrome 加载缓慢; FF 和 Opera 都很好

css - 有没有办法在保持宽高比的情况下在 IE7 和 IE8 中使用背景大小?

angular - 如何在 Ionic 2 中使用管道(发布 v2.2.1)

pagination - Angular2 分页不起作用

javascript - 页面加载进度