Passing context to tooltip of ngx bootstrap

Discussão em 'Angular' iniciado por L. C., Abril 22, 2025.

  1. L. C.

    L. C. Guest

    I'm working with tooltip in ngx-bootstrap, and want to pass data to the ng-template being to the tooltip. The documentation provides [tooltipContext], but it didn't seem to be working. I have provided a code snippet.

    HTML:

    <ng-template #tooltipTmpl let-view="view">
    <div class="tooltip-section">
    <div class="section-title">
    {{ view.dateRangeText }}
    </div>
    <div class="section-text">
    {{ view.data }}
    </div>
    </div>
    </ng-template>
    <div
    *ngIf="view.isVisible"
    [tooltip]="tooltipTmpl"
    [tooltipContext]="{view: view}"
    containerClass="white-tool-tip"
    placement="top"
    >
    <div class="sub-title">
    {{ view.title }}
    </div>
    </div>


    REF: https://valor-software.com/ngx-bootstrap/#/tooltip

    Continue reading...

Compartilhe esta Página