title: Angular directive works only the first time
body: <p>I have created amCharts directive which somehow works only first time, the second time doesn't show up until i clear browser cache.
  Another problem is that it only works in Chrome :/</p>
  
  <p>Here is my code: </p>
  
  <pre><code>.directive('amGraph', function(){
      return {
          restrict: 'E',
          replace: true,
              scope: {
              getArchiveData: '='
          },
          template: '&lt;div id="chartdiv"&gt;&lt;/div&gt;',
          link: function (scope, element, attrs){
  
              scope.$watch('getArchiveData', function(data){
  
                   var chart = false;
  
                   var initChart = function(){
                       if (chart) chart.destroy();
  
                       chart = new AmCharts.makeChart("chartdiv", {
                            ...
                       });
                   };
  
                   initChart();
  
              });
          }
       }
   })
  </code></pre>
  
  <p>This is HTML:</p>
  
  <pre><code>&lt;div ng-controller="dataCtrl"&gt;
  &lt;am-graph get-archive-data="getData"&gt;&lt;/am-graph&gt;
  &lt;/div&gt;
  </code></pre>