所以我基本上试图在我的Angular代码中访问对象中对象之一的值。这是一个Map对象,看起来像这样
export interface CalendarEvent<MetaType = any> {
id?: string | number;
start: Date;
end?: Date;
title: string;
color?: EventColor;
actions?: EventAction[];
allDay?: boolean;
cssClass?: string;
resizable?: {
beforeStart?: boolean;
afterEnd?: boolean;
};
draggable?: boolean;
meta?: MetaType;
amount: number;
type: Map<string, string>
}
我尝试创建一个NgFor,就像以前在在线解决方案中看到的那样
<p *ngFor="let item of modalData?.event.type.keys | keyvalue" > {{item.key}} {{item.value}} </p>
我想在代码行中显示键和值对