title: AngularJS - Clone element with functionality
body: <p>I have a directive in which I want to clone a DOM element that they are exactly the same with all bindings. That when one of them changes, the other one changes as well. Is that possible? I understand I somehow have to compile the copied element but are they interconnected with the changes then?</p>
  
  <pre><code>angular.module('app').directive('test', function ($compile) {
    return {
    restrict: 'A',
    link: function (scope, element, attrs) {
  
     angular.element(document).ready(function () {
  
        var $header = angular.element(XXX).clone();
        // $compile($header)(scope); // not sure about this one. it doesn't work
        var $newHeader = angular.element(YYY).append($header);
  
      }
    }
  });
  </code></pre>