Search code examples
angularpopoverngx-bootstrapngx-bootstrap-popover

disable ngx-bootstrap popover?


Is there a way for a popover to not show over the label if it doesn't meet the condition?

<label [popover]-"popTemplate" popoverTitle="Nicknames">{{label}}</label>

<ng-template #popTemplate>
<li *ngFor="let names of nickNames">
      {{ names }}
    </li>
</ng-template>

Is there something like [isDisabled]="!haveNickNames()"? or use ngIf in some way?


Solution

  • Given the documentation, you can use the isOpen property

    <label [popover]="popTemplate" triggers="" [isOpen]="!haveNickNames">
      {{label}}
    </label>