在子元素中使用 ngFor 的局部变量

Using local variable of ngFor in child elements

我想显示一个 属性 的局部变量 theme 比如 theme.name.

这就是我的 *ngFor 的样子

<ul>
   <li *ngFor="#theme of themes">
      <span>theme.name</span>
   </li>
</ul>

我也试过用{{theme.name}},但也没用。

如果

{{theme.name}}

不行,那就

{{theme?.name}}

可能会