阅读背景:

在编译ng-bind-html之后,ng-click不工作

来源:互联网 

I have a directive

我有一个指令

app.directive("dir", function($compile, $sce){
      return{
        restrict: "E",
        link: function(scope, element, attr){
          scope.$watch('content',function(){
            var html = $sce.trustAsHtml(attr.content);
            scope.alabala = $compile(html)(scope);
          },true);
        },
        template: "<div ng-bind-html='alabala'></div>",
      }
    });
app.directive("d



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: