码迷,mamicode.com
首页 > Web开发 > 详细

Angularjs

时间:2016-09-09 12:05:02      阅读:215      评论:0      收藏:0      [点我收藏+]

标签:

app.directive("itemPopover",function($timeout){
    return {
        restrict : "A",
        link : function(scope,element,attrs){
            element.popover();
             
            var  createText = "<div class=‘hover‘ sadsdas style=‘position:absolute;top:50%;left:125px;width:400px;z-index:9999999;font-size:26px;color:#fff;text-align:center;‘>请输入文本</div>";
            var con = angular.element(".app-content");
             
            element.on("click",function(){
                if(attrs.tag == "createText"){
                    console.log(con)
                    $timeout(function(){
                        con.append(createText);
                    });
                }
            });
             
        }
    }
});

Angularjs

标签:

原文地址:http://www.cnblogs.com/herd/p/5855773.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!