我可以在 AngularDart 中使用类型检查(is 关键字)创建 ngIf 吗?

Can I make a ngIf using type check (the is keyword) in AngularDart?

我有一个包含 3 个项目的列表:[Class1 a、Class2 b、Class3 c]。
如何在模板中进行 switch 或 ngIf 以根据类型生成一些 html ?

<div *ngFor="let item of items">
    <div *ngIf="item is CoolClass”>somehtml</div>
    <div *ngIf=item is SomeOtherClass”>some other html</div>
</div>

这个不行,说ngIfIs不能绑定

模板表达式不支持 is-checks。

必须在我的组件中创建辅助函数,例如 isCoolClass 和 isSomeOtherClass。