html * ngIf else

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html * ngIf else相关的知识,希望对你有一定的参考价值。

<ng-template *ngIf="isThumbView && Constants.LANG_NAME == Constants.LANG_EN;then showTemplate1; else showTemplate2">
</ng-template>

<ng-template #showTemplate1>
  data here
</ng-template>

<ng-template #showTemplate2>
  another data here
</ng-template>

以上是关于html * ngIf else的主要内容,如果未能解决你的问题,请参考以下文章

html * ngIf else

html 角度5 ngIf / else

html ngif-异步-AS-else.html

*ngIf-else 不显示 else 结果

如何使用“*ngIf else”?

将 ngFor 变量传递给 ngIf 模板