如何使用ngx-bootstrap显示禁用按钮上的工具提示

Fra*_*rzi 5 javascript tooltip typescript ngx-bootstrap angular

在我的Angular 6应用程序中,我目前正在使用ngx-bootstrap中Tooltip功能来显示工具提示.

我需要在一些禁用按钮中显示工具提示,但它不起作用(它只适用于非禁用按钮).

有没有办法改变这种行为,并始终显示工具提示(无论该项是否被禁用)?

小智 2

尝试使用禁用类的示例我取得了成功。

<div class="card">
    <div class="card-header">
        <h3>Test</h3>
    </div>
    <div class="card-body">
        <button type="button" class="btn btn-default btn-secondary mb-2 disabled "
                tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."
                placement="top">
            Tooltip
        </button>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)