angularjs - How to bind title attribute value in ng-table -


i using ng-table display values in table view. message displayed in remarks column (last column of table) huge. so, displaying few character. when user hovers on cells want show entire message in tool-tip. tried set in title attribute, it's not working.

sample code : http://plnkr.co/edit/i4nctnhmfxgbbx7zjxs9?p=preview

<table ng-table="tableparams" class="table">         <tr ng-repeat="doc in $data">         <td data-title="'#'" sortable="doc_name">{{$index + 1 }}</td>         <td data-title="'visa type'" sortable="'type'">{{doc.type}}</td>         <td data-title="'country'" sortable="'country'">{{doc.country}}</td>         <td data-title="'starting date'" sortable="'start_date'">{{doc.start_date}}</td>         <td data-title="'expired date'" sortable="'end_date'">{{doc.end_date}}</td>         <td data-title="'remarks'" sortable="'remarks'" title="{{doc.remarks}}">         {{doc.remarks | limitto: 15 }} {{doc.remarks.length > 15 ? '...' : ''}}         </td>         </tr> </table> 

please suggest me how show tool-tip using html title attribute.

i think can use ng-attr-title that, basicly code remains same, before 'title=' add 'ng-attr-'. last line like: <td data-title="'remarks'" sortable="'remarks'" ng-attr-title="{{doc.remarks}}">

i haven't tested on table cells before, theoretically should trick :-)

update

see working plunkr: http://plnkr.co/edit/whm04jgoie3ozi244fqj?p=preview

as can see made ng-table.js local, , in index.html put ng-attr-title in front of ng-table attributes.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -