angularjs @if in angular example [关闭]

acruukt9  于 6个月前  发布在  Angular
关注(0)|答案(1)|浏览(71)

已关闭。此问题需要details or clarity。目前不接受回答。
**要改进此问题吗?**通过editing this post添加详细信息并阐明问题。

3天前关闭。
Improve this question
在Angular中,*ngIf指令用于条件渲染。将其转换为@if语法
例如,如果你有一个Angular组件,它像这样使用 *ngIf:

<div *ngIf="variable">
    <!-- Content to be displayed when variable is truthy -->
</div>

字符串
那么@if看起来像:.

ktecyv1j

ktecyv1j1#

请检查文档:
1.样

  1. about for
    1.关于交换机
@if(variable)
    {
       <!-- Content to be displayed when variable is truthy -->
    }

字符串

相关问题