我正在设置代码以仅在其中有数据时显示图像。如果值未定义,我需要隐藏。.help此处...
<div class="column" *ngIf="idvisaurl">
<img width="100" height="100" [src] ="idvisaurl">
<div><h5 style="font:bold">Visa Photo</h5></div>
答案 0 :(得分:0)
与虚拟内容共享了一个参考代码....
HTML:
<div *ngIf="show != undefined">
"CONTEMNTTT"
</div>
<div *ngIf="notShow != undefined" >
"CONTEMNTTT"
</div>
TS:
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
show = "show";
notShow
}