web/js/bubble.js
function() {
    var self = this;
    
    if (typeof CompilerInitialized !== "undefined") return true;
    
    oldPrepend = $.fn.prepend;
    $.fn.prepend = function()
    {
      var isFragment =
        arguments[0][0] && arguments[0][0].parentNode
        && arguments[0][0].parentNode.nodeName == "#document-fragment";
      var result = oldPrepend.apply(this, arguments);
      if (isFragment)
      AngularCompile(arguments[0]);
      return result;
    };
    
    oldAppend = $.fn.append;
    $.fn.append = function()
    {
      var isFragment =
        arguments[0][0] && arguments[0][0].parentNode
        && arguments[0][0].parentNode.nodeName == "#document-fragment";
      var result = oldAppend.apply(this, arguments);
      if (isFragment)
      AngularCompile(arguments[0]);
      return result;
    };

    AngularCompile = function(root)
    {
      var injector = angular.element($('[ng-app]')[0]).injector();
      var $compile = injector.get('$compile');
      var $rootScope = injector.get('$rootScope');
      var result = $compile(root)($rootScope);
      $rootScope.$digest();
      return result;
    }
    
    CompilerInitialized = true;
  }
function() {
    var self = this;
    
    if (typeof CompilerInitialized !== "undefined") return true;
    
    oldPrepend = $.fn.prepend;
    $.fn.prepend = function()
    {
      var isFragment =
        arguments[0][0] && arguments[0][0].parentNode
        && arguments[0][0].parentNode.nodeName == "#document-fragment";
      var result = oldPrepend.apply(this, arguments);
      if (isFragment)
      AngularCompile(arguments[0]);
      return result;
    };
    
    oldAppend = $.fn.append;
    $.fn.append = function()
    {
      var isFragment =
        arguments[0][0] && arguments[0][0].parentNode
        && arguments[0][0].parentNode.nodeName == "#document-fragment";
      var result = oldAppend.apply(this, arguments);
      if (isFragment)
      AngularCompile(arguments[0]);
      return result;
    };

    AngularCompile = function(root)
    {
      var injector = angular.element($('[ng-app]')[0]).injector();
      var $compile = injector.get('$compile');
      var $rootScope = injector.get('$rootScope');
      var result = $compile(root)($rootScope);
      $rootScope.$digest();
      return result;
    }
    
    CompilerInitialized = true;
  }
function ( ) { var self = this ; if ( typeof CompilerInitialized !== "undefined" ) return true ; oldPrepend = $ . fn . prepend ; $ . fn . prepend = function ( ) { var isFragment = arguments [ 0 ] [ 0 ] && arguments [ 0 ] [ 0 ] . parentNode && arguments [ 0 ] [ 0 ] . parentNode . nodeName == "#document-fragment" ; var result = oldPrepend . apply ( this , arguments ) ; if ( isFragment ) AngularCompile ( arguments [ 0 ] ) ; return result ; } ; oldAppend = $ . fn . append ; $ . fn . append = function ( ) { var isFragment = arguments [ 0 ] [ 0 ] && arguments [ 0 ] [ 0 ] . parentNode && arguments [ 0 ] [ 0 ] . parentNode . nodeName == "#document-fragment" ; var result = oldAppend . apply ( this , arguments ) ; if ( isFragment ) AngularCompile ( arguments [ 0 ] ) ; return result ; } ; AngularCompile = function ( root ) { var injector = angular . element ( $ ( '[ng-app]' ) [ 0 ] ) . injector ( ) ; var $compile = injector . get ( '$compile' ) ; var $rootScope = injector . get ( '$rootScope' ) ; var result = $compile ( root ) ( $rootScope ) ; $rootScope . $digest ( ) ; return result ; } CompilerInitialized = true ; }
need Angular to recompile new elements after DOM manipulation
need Angular to recompile new elements after DOM manipulation