Angularjs给动态生成的元素绑定事件

//获取动态生成的元素
            getJqforAnguar:function(jqid){
                angular.element(document).injector().invoke(function($compile){// 编译html
                    var $jqid = jqid;
                    var scope = angular.element($jqid).scope();
                    $compile($jqid)(scope);
                })
            },

猜你喜欢

转载自www.cnblogs.com/chenlw/p/9364670.html