Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/396.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用Angular2和引导向表数据添加工具提示/弹出框?_Javascript_Twitter Bootstrap_Angular - Fatal编程技术网

Javascript 如何使用Angular2和引导向表数据添加工具提示/弹出框?

Javascript 如何使用Angular2和引导向表数据添加工具提示/弹出框?,javascript,twitter-bootstrap,angular,Javascript,Twitter Bootstrap,Angular,如果我听起来有点经验不足(我是),请容忍我,但我目前正在尝试使用Angular2和引导功能向td添加工具提示或弹出框(无论哪一个,都不重要),以最终消除不必要的列。我希望弹出窗口或工具提示在鼠标悬停而不是单击时打开。我已经尝试过通过nodejs安装ng2 popover模块,正如这里的另一篇文章所建议的那样,但没有效果。以下是我表格开头的简化版本: <table class="table table-striped table-bordered table-hover"> <t

如果我听起来有点经验不足(我是),请容忍我,但我目前正在尝试使用Angular2和引导功能向td添加工具提示或弹出框(无论哪一个,都不重要),以最终消除不必要的列。我希望弹出窗口或工具提示在鼠标悬停而不是单击时打开。我已经尝试过通过nodejs安装ng2 popover模块,正如这里的另一篇文章所建议的那样,但没有效果。以下是我表格开头的简化版本:

<table class="table table-striped table-bordered table-hover">
<tbody><tr>
<th>Table Name</th>
<th> Max As Of Date </th>
<th> Row Count for Date</th>
<th> Comments </th><th>
<td> Table Data </td>

表名
截至日期的最大值
日期行计数
评论
表数据
最初向其他人推荐使用ng2 popover模块而不是JQuery的人建议如下:

<span popover="content to be shown in the popover">
element on which this popover is applied.
</span>

应用此popover的元素。
然而,当我在那里安装td时,这对我来说并不起作用。如果您有任何线索,请提前感谢您

您可以使用 angular的引导:

已具有适用于角度的工具提示功能

<div class="form-group" ng-class="{'has-error' : !inputModel}">
      <label>Disable tooltips conditionally:</label>
      <input type="text" ng-model="inputModel" class="form-control"
             placeholder="Hover over this for a tooltip until this is filled"
             uib-tooltip="Enter something in this input field to disable this tooltip"
             tooltip-placement="top"
             tooltip-trigger="mouseenter"
             tooltip-enable="!inputModel" />
    </div>

有条件地禁用工具提示:
只需添加指令,如:

uib工具提示:要显示的文本
工具提示放置:放置或将文本放置在何处
工具提示触发器:什么会使文本出现(可以是任何事件)

这是一个