从http://angular-ui.github.io/bootstrap/获得一个示例,并遵循我的说明:
<button popover="I appeared on mouse enter!" popover-trigger="mouseenter" class="btn btn-default">Mouseenter</button>
当我把鼠标移到按钮上时,我得到:
在那里我找到了一条指令:“popover指令需要$position服务。”但不知道这意味着什么。我是初学者,所以请帮帮我。可能需要初始化吗?我在官方网站上找不到
发布于 2014-11-14 12:27:01
指定弹出位置解决了我的问题。
示例:
<input type="number"
popover-placement="top"
popover="This is some text that explains something"
popover-trigger="focus">
发布于 2015-02-18 18:35:32
工具提示和弹出的位置/位置似乎存在问题。这与对angular.isDefined的更改有关,AngularJS 1.2和1.3的工作方式不同。
下面是通过设置默认值来修补问题的几条指令
// Bootstrap UI fixes after upgrading to Angular 1.3
.directive('tooltip', function() {
return {
restrict: 'EA',
link: function(scope, element, attrs) {
attrs.tooltipPlacement = attrs.tooltipPlacement || 'top';
attrs.tooltipAnimation = attrs.tooltipAnimation || true;
attrs.tooltipPopupDelay = attrs.tooltipPopupDelay || 0;
attrs.tooltipTrigger = attrs.tooltipTrigger || 'mouseenter';
attrs.tooltipAppendToBody = attrs.tooltipAppendToBody || false;
}
}
})
.directive('popover', function() {
return {
restrict: 'EA',
link: function(scope, element, attrs) {
attrs.popoverPlacement = attrs.popoverPlacement || 'top';
attrs.popoverAnimation = attrs.popoverAnimation || true;
attrs.popoverPopupDelay = attrs.popoverPopupDelay || 0;
attrs.popoverTrigger = attrs.popoverTrigger || 'mouseenter';
attrs.popoverAppendToBody = attrs.popoverAppendToBody || false;
}
}
})
发布于 2014-11-05 18:41:56
也许您使用的是角1.3.1,它可以打破弹出式,角1.3.0有效。
https://stackoverflow.com/questions/26751579
复制相似问题