我正在关注Angular bootstrap docs中的工具提示示例,但似乎无法让工具提示工作。我正在使用Angular版本1.5.5和角引导版本0.11.2。如何获取Angular Bootstrap工具提示?
这里是我的代码: app.js
angular.module('app', ['ui.bootstrap'])
.controller('TooltipDemoCtrl', function ($scope) {
//doesn't matter from what I can tell
})
的index.html
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
</body>
tooltip.html
<div ng-controller="TooltipDemoCtrl">
<div class="w-col w-col-4 w-col-small-4 w-col-tiny-4 w-clearfix icon-col">
<img width="17" src="../assets/images/pc-icon-two.png"
uib-tooltip="NOT WORKING" class="info-icon-five1">
</div>
</div>
我有一张我想用作工具提示的图像。我试图在img标签和div标签中移动uib-tooltip。两者都不起作用。这里发生了什么?
在控制台中的任何错误? – ochi
@ochi控制台没有错误。如果它像使用uib-tooltip一样简单,那么问题是什么?有没有什么东西可以剔除这个指令,或者有什么东西可以包含在我可能错过的控制器中? – rashadb
您包含了所有使用ui bootstrap的脚本? – sebenalern