我在其中包含Tab列表作为其子元素的Tabs组件中具有此功能。
除了IE 11之外,该逻辑在其他任何地方都工作正常。
我在polyfills.ts中添加了IE11所需的内容,但没有帮助。
==================================================
exception
=====================================================
ERROR TypeError: Object expected
"ERROR"
{
[functions]: ,
@@hasInstance: undefined,
@@isConcatSpreadable: undefined,
@@iterator: undefined,
@@match: undefined,
@@observable: undefined,
@@replace: undefined,
@@rxSubscriber: undefined,
@@search: undefined,
@@species: undefined,
@@split: undefined,
@@toPrimitive: undefined,
@@toStringTag: undefined,
@@unscopables: undefined,
__proto__: { },
description: "Object expected",
message: "Object expected",
name: "TypeError",
number: -2146823281,
stack: "TypeError: Object expected
ERROR Error: Uncaught (in promise): TypeError: Object expected
TypeError: Object expected
at QueryList.prototype[]
at iterateListLike
at DefaultIterableDiffer.prototype.check
at DefaultIterableDiffer.prototype.diff
at NgForOf.prototype.ngDoCheck
at checkAndUpdateDirectiveInline
at checkAndUpdateNodeInline
at checkAndUpdateNode
at prodCheckAndUpdateNode
at Anonymous function (Function code:81:5)",
Symbol()_m.e3qplm0ag21: undefined,
Symbol()_n.e3qplm0ag21: undefined,
Symbol()_p.e3qplm0ag21: undefined,
Symbol(rxSubscriber)_o.e3qplm0ag21: undefined
}
html是
<li *ngFor="let tab of tabs" (click)="selectTab(tab)" [class.active]="tab?.active"> <a> {{tab?.title}} </a> </li>
有什么主意吗?