title: Angular JS: What is the need of the directive’s link function when we already had directive’s controller with scope?
body: <p>I need to perform some operations on scope and the template. It seems that I can do that in either the <code>link</code> function or the <code>controller</code> function (since both have access to the scope).</p>
  
  <p>When is it the case when I have to use <code>link</code> function and not the controller?</p>
  
  <pre><code>angular.module('myApp').directive('abc', function($timeout) {
      return {
          restrict: 'EA',
          replace: true,
          transclude: true,
          scope: true,
          link: function(scope, elem, attr) { /* link function */ },
          controller: function($scope, $element) { /* controller function */ }
      };
  }
  </code></pre>
  
  <p>Also, I understand that <code>link</code> is the non-angular world. So, I can use <code>$watch</code>, <code>$digest</code> and <code>$apply</code>.</p>
  
  <p>What is the significance of the <code>link</code> function, when we already had controller?</p>