TypeError:无法在 IE 10 上获取未定义或 null 引用的属性“ngMetadataName”

2024-03-14

在 IE 10 中,我收到以下错误:(但在 IE 11 中正常)

类型错误:无法获取未定义或空引用的属性“ngMetadataName”

该物业ngMetadataName已被发现于vendor.js.

The Polyfills.ts如下:

  /******************************************************************************* 

BROWSER POLYFILLS
*/
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
import 'classlist.js'; // Run npm install --save classlist.js.

/** IE10 and IE11 requires the following for the Reflect API. */
import 'core-js/es6/reflect';

/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';

/**

Web Animations @angular/platform-browser/animations
Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
**/
import 'web-animations-js'; // Run npm install --save web-animations-js.
/**

By default, zone.js will patch all possible macroTask and DomEvents
user can disable parts of macroTask/DomEvents patch by setting following flags
*/
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames

/*

in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
with the following flag, it will bypass zone.js patch for IE/Edge
*/
(window as any).__Zone_enable_cross_context_check = true;
/***************************************************************************************************

Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************

APPLICATION IMPORTS
*/

您能否建议如何解决 IE 10 的此问题?

Thanks


我已经更新了角度-cli从 6.0.8 到 6.2.3(最新),它解决了上述错误。

这个链接github#24339 https://github.com/angular/angular/issues/24339可能会有帮助。

感谢@Suresh Kumar Ariya

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

TypeError:无法在 IE 10 上获取未定义或 null 引用的属性“ngMetadataName” 的相关文章

随机推荐

  • Java:一个文件中的多个类声明

    在 Java 中 您可以在单个文件中定义多个顶级类 前提是其中最多有一个是公共的 请参阅JLS 7 6 http docs oracle com javase specs jls se8 html jls 7 html jls 7 6 参见
  • 从 MS SQL 中的 PHP PDO 存储过程返回 Select *

    对于未来的用户 这个问题的底部包含更正的工作代码 我知道 Select 不是最好的 但在这个示例中 我尝试从 php 调用存储过程并返回整个结果集 以便我可以在代码中循环遍历数组 这是我当前的存储过程 USE hanoncs AskMe G
  • 如何在codeigniter中获取http请求正文数据?

    我在从 IOS obj c 客户端将 JSON 编码数据发布到 CI 控制器时遇到问题 我相信我的问题与提到的问题相同here https stackoverflow com questions 8569150 codeigniter re
  • 在嵌套对象上使用 JsonConvert.DeserializeObject

    我想在加载应用程序时使用 JSON Net 来处理配置文件的解析 将所有 KVP 保持在同一范围内绝对没问题 不过 我想将其分解为子类别 例如 Settings WebServer Settings GameServer 等 为了便于阅读
  • ffmpeg从mp4中提取基本流

    我已经使用 Bambuser 的 ffmpeg 端口成功将 ffmpeg 库移植到 Android 我目前正在研究 ffmpeg 的源代码 特别是 ffplay c 和 api examples c 文件 我想从 Android 2 2 录
  • 找到 numpy 数组中最大的正方形

    我正在尝试解决这个算法问题 在 numpy 数组中找到只有一个值的最大平方 示例图片 我的代码花费了太多时间 有办法提高速度吗 import numpy as np answer 0 def allsame board memory boa
  • 使用单层感知器求解 XOR

    我一直听说 XOR 问题不能通过单层感知器 不使用隐藏层 来解决 因为它不是线性可分的 我知道没有线性函数可以区分类别 但是 如果我们使用像 sin 或 cos 这样的非单调激活函数 情况仍然如此吗 我想这些类型的函数可能能够将它们分开 Y
  • Caliburn.Micro:以编程方式创建和绑定视图

    我目前正在 Caliburn Micro 中尝试视图合成 我有一个工作示例 其中我通过 View Model 附加属性路由将多个基于用户控件的视图注入到我的主 shell 中 到目前为止 一切都很好 在我的应用程序中 我正在使用主要由 Wi
  • 多处理 numpy 未定义错误

    我正在使用以下测试代码 from pathos multiprocessing import ProcessingPool as Pool import numpy def foo obj1 obj2 a obj1 2 b numpy as
  • 聚合elasticsearch中的值数组

    我需要聚合一个数组 如下所示 两个文档示例 index log type travels id tnQsGy4lS0K6uT3Hwzzo g score 1 source state saopaulo date 2014 10 30T17
  • (int_1 += *pointer++ = int_2++) < int_3 是什么意思?

    我正在读书这个之前的答案 https stackoverflow com a 14164818 1894277其中有一段我无法理解的C代码 它本质上看起来像这样 if int 1 pointer int 2 lt int 3 continu
  • 当我尝试使用 CComObject 函数 CreateInstance 时,_pAtlModule 指针为空

    我正在开发 OPC OLE 过程控制 客户端程序 使用异步 CALLBACK 方法使用 KepServer 从 PLC 获取数据 但是我遇到了问题 CComObject
  • 为什么 bash 在 Windows 中冻结?

    我正在 Windows 中运行 bash 程序 该程序与 msys 和 mingw 一起安装 我正在尝试跑步 configure 但是 每当我这样做时 配置都会冻结 checking whether make sets MAKE 您能想到为
  • 如何使用 JDK 11/Maven/Eclipse IDE 运行 JavaFX 应用程序

    问题 从 Eclipse IDE 运行基于 Maven 非模块项目 项目名称 howdyjfx 的 JavaFX 应用程序会生成以下编译错误 ERROR Failed to execute goal org codehaus mojo ex
  • clearInterval() 不会停止 setInterval() - Firefox 扩展开发

    我正在修改篡改数据 这将允许我将其观察到的 HTTP 请求 响应发送到服务器 到目前为止 该功能已正确实现 下一步是自动化此过程 我希望使用 复选框 类型的工具栏菜单按钮来打开和关闭此功能 到目前为止 我在 XUL 中有这段代码
  • File.Copy 目标文件是目录,而不是文件。

    我可能没有正确执行此操作 并且浏览 MSDN 库对我没有多大帮助 我正在尝试将数据库从项目文件夹复制到另一个位置 我最初尝试了桌面 它指出该目录不可用 这就是我目前所拥有的 private string currentDb J Projec
  • 无法从多维数组的初始值设定项推断边界

    以下代码无法编译 int main int a 0 1 2 3 产生的错误消息是 error declaration of a as multidimensional array must have bounds for all dimen
  • Git 拉取 Push.default 警告

    当我将 git commit 推送到远程存储库时 出现了以下警告 clyde browns computer 2 bloccit clydiscope git commit m Installed gem faker and generat
  • 可折叠If语句

    我最近使用 PMD 嵌入 hudson 偶然发现以下警告 我的代码似乎受到了影响可折叠If语句 我并不完全理解 代码看起来像这样 list to be filled with unique Somethingness List list n
  • TypeError:无法在 IE 10 上获取未定义或 null 引用的属性“ngMetadataName”

    在 IE 10 中 我收到以下错误 但在 IE 11 中正常 类型错误 无法获取未定义或空引用的属性 ngMetadataName 该物业ngMetadataName已被发现于vendor js The Polyfills ts如下 BRO