;    var pre = document.createElement(&#39;pre&#39;);&#10;    elem.after(pre);&#10;&#10;    scope.$watchCollection(function() {&#10;      return Array.prototype.slice.call(elem[0].attributes).reduce(function(aggr, attr) {&#10;        if (attr.name !== attrs.$attr.showAttrs) aggr[attr.name] = attr.value;&#10;        return aggr;&#10;      }, {});&#10;    }, function(newValues) {&#10;      $timeout(function() {&#10;        pre.textContent = angular.toJson(newValues, 2);&#10;      });&#10;    });&#10;  };&#10;