Javascript 如何在angularjs中悬停显示文本?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28924756/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to display text in hover over in angularjs?
提问by butYouDontLookLikeADeveloper
I am very new to AngularJS. I want to display {{Project.inrtcvalue}}when the mouse is hovered over values. How can I do this in AngularJS?
我对 AngularJS 很陌生。我想{{Project.inrtcvalue}}在鼠标悬停在值上时显示。我怎样才能在 AngularJS 中做到这一点?
<table ng-table="tableParams" show-filter="true" class="table" >
<tr ng-class="{'danger': project.rag <= 35, 'warning': project.rag > 35 && project.rag < 70 , 'success': project.rag > 70}" ng-repeat="project in $data">
<td data-title="'PRN'" sortable="'prn'" filter="{'prn': 'text'}">
{{project.prn}}
</td>
</tr>
</table>
So when the user hovers over these <td>I want to display a value from a controller. How do I do this? What is the best way to do this?
因此,当用户将鼠标悬停在这些上方时,<td>我想显示来自控制器的值。我该怎么做呢?做这个的最好方式是什么?

