AngularJS ng-attr-title在Chrome浏览器中不起作用 [英] Angularjs ng-attr-title not working in chrome browser

查看:103
本文介绍了AngularJS ng-attr-title在Chrome浏览器中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ng-table在表格网格视图中显示所有值.当用户将鼠标悬停在单元格上时,我想显示一些消息.因此,我正在使用ng-attr-title作为工具提示.它可以在firfox中运行,但不能在google chrome网络浏览器中运行.

I am using ng-table to display all values in table grid view. I want to display some messages when user hover the cell. So I am using ng-attr-title as a tool-tip. It's working in firfox, but it's not working in google chrome web browser.

Sample 柱塞

谢谢.

推荐答案

似乎我们在其他问题中对此进行了讨论

It seems we have discuss it in other Question Here. Use Div there for resolving this issue.

我已经编辑了您的HTML块:

I have Edited your HTML BLOCK:

<!DOCTYPE html>
<html>

  <head>

    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
     <link rel="stylesheet" href="style.css">
    <script src="https://code.angularjs.org/1.2.9/angular.min.js"></script>
    <script src="http://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap-tpls.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/ng-table/0.3.3/ng-table.min.js"></script>

    <script src="script.js"></script>
  </head>

  <body ng-app="myApp">
    <table ng-table="tableParams" class="table" ng-controller="ctrl">
        <tbody>
            <tr ng-repeat="foo in data">
                <td data-title="'Name'">{{foo.name}}</td>
                <td data-title="'Age'">{{foo.age}}</td>
                <td ng-attr-title="{{foo.Desc}}" data-title="'Remarks'" >
                    <div ng-attr-title="{{foo.Desc}}">{{foo.Desc | limitTo: 15 }} {{foo.Desc.length > 15 ? '...' : ''}}</div>

                </td>
            </tr>
        </tbody>
    </table>
</body>

</html>

使用脚本完成代码,请参见 PLUNKER

Complete Code with Script see this PLUNKER

这篇关于AngularJS ng-attr-title在Chrome浏览器中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆