将上下文传递到ngx引导程序的工具提示

问题描述 投票:0回答:1

我正在使用ngx-bootstrap中的工具提示,并希望将数据传递给工具提示的ng-template。该文档提供了[tooltipContext],但似乎没有用。我提供了一个代码段。

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

javascript html angular tooltip ngx-bootstrap
1个回答
0
投票

我在项目中使用了引导程序popover,因此建议使用弹出窗口。

[此外,在GitHub上创建了一个问题,但用户最终使用了popover-https://github.com/valor-software/ngx-bootstrap/issues/4775

© www.soinside.com 2019 - 2024. All rights reserved.