Tooltip

#介绍

gihub地址:https://github.com/angular-ui/bootstrap/tree/0.14.3/src/tooltiparrow-up-right

注意版本不同,使用outclick得版本大于0.14.3

代码

conroller

   // product info tip
        $scope.openedTooltip = false;
        $scope.productInfoTooltip =  function (id, ean, language) {
            if ($scope.openedTooltip != ean) {
                $scope.openedTooltip = false;
            }

            var url = '/approvalCMS/product/viewTip?shop_id=' + $scope.shopId  +
                '&product_id=' + id + '&ean='+ ean + '&language='+ language;
            $scope.productHtmlTooltip = $sce.trustAsHtml(
                '<iframe frameborder="0" onload="loadProductInfoTip()" ' +
                ' name="productInfoTip" width="' + $window.innerWidth/2 +
                '" height="' +  $window.innerHeight/2 + '" src="' + url + '"></iframe>'
            );
            $scope.openedTooltip =($scope.openedTooltip != false ? false : ean);
        };

主要引入$sce, $window

页面

问题点:当打开的是一个iframe,有滑动的,需要看完,划出才关闭.

这样写保证火狐和谷歌浏览器的兼容性.

资料

AngularJs的UI组件ui-Bootstrap分享(八)——Tooltip和Popoverarrow-up-right

angular-ui-bootstrap中,setTriggers无效arrow-up-right

jQuery.ready() 函数详解arrow-up-right

mouseout 事件与mouseleave 事件区别arrow-up-right

iframe

Web前端之iframe详解arrow-up-right

iframe高度自适应的6个方法arrow-up-right

iframe加载完成事件arrow-up-right

angularjs 在 iframe 里面无法正确显示 src 指定的内容arrow-up-right

用iframe方式为页面加载完毕前显示等待提示arrow-up-right

问题

how to detect if the iframe is fully loaded in angulararrow-up-right

uib-tooltip-html not workingarrow-up-right

AngularJS using $sce.trustAsHtml with ng-repeatarrow-up-right

AngularJS Error: $rootScope:infdigarrow-up-right

angular怎么监听屏幕宽度改变arrow-up-right

Angularjs 动态获取屏幕宽度arrow-up-right

Last updated

Was this helpful?