How to display text on hover in angularjs?

I am very new to angularjs. I want to display {{Project.inrtcvalue}} when the mouse freezes over values. How can I do this in 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 is hovering over them <td> , I want to display the value from the controller. How can I do it? What is the best way to do this?

+5
source share
2 answers

You just have to use the {{variable}} notation in the HTML header tag.

So something like:

 <td title="{{project.inrtcvalue}}"> 

See plunkr for an example (Thanks dfsq )

+9
source

You can use the ng-mouseover and ng-show directives to accomplish this. This is an example. An example . We hope this helps you get started.

+5
source

Source: https://habr.com/ru/post/1214921/


All Articles