<p-overlayPanel #op *ngIf="infraHostIPs && infraHostIPs.length > 1"> <div *ngFor="let ip of infraHostIPs"> {{ip.address}} </div> </p-overlayPanel> <a style="cursor: pointer; text-decoration: underline" (click)="op.toggle($event)">{{infraHostIPs[0].address}}</a>