deepthan / blog-angular

Angular 笔记
280 stars 58 forks source link

ngular TypeError “remove”TypeError 无法获取未定义或 null 引用的属性“remove” #129

Open deepthan opened 3 years ago

deepthan commented 3 years ago

IE报错 ngular TypeError “remove”TypeError: 无法获取未定义或 null 引用的属性“remove”

angular TypeError “remove”TypeError: 无法获取未定义或 null 引用的属性“remove”     
at DefaultDomRenderer2.prototype.removeClass(http://localhost:4100/vendor.js:102963:67)   
at BaseAnimationRenderer.prototype.removeClass(http://localhost:4100/vendor.js:101543:69)     
at DebugRenderer2.prototype.removeClass (http://localhost:4100/vendor.js:93720:5)  
at NzIconDirective.prototype.handleSpin (http://localhost:4100/vendor.js:191432:9) at Anonymous function (http://localhost:4100/vendor.js:191385:13)   at  
ZoneDelegate.prototype.invoke (http://localhost:4100/polyfills.js:3395:13)   at onInvoke (http://localhost:4100/vendor.js:89536:13)     
at ZoneDelegate.prototype.invoke (http://localhost:4100/polyfills.js:3395:13)   at Zone.prototype.run (http://localhost:4100/polyfills.js:3155:17)     
at Anonymous function (http://localhost:4100/polyfills.js:3915:17)

这是由于ngx-echart导致的报错,在polyfills文件中加入如下代码即可。

import 'core-js/es7/array';

import 'classlist.js'; // Run npm install --save classlist.js.

ngx-echart Support for IE