title: Event handler inside angular directives
body: <p>I am trying to understand a bit further how directives work, so I wrote this simple directive:</p>
  
  <pre><code>Avraam.directive('whoami',function(){
      return{
          restrict:'A',
          template:"&lt;label id='avraam'&gt;Avraam&lt;/label&gt;",
          link:function(scope, element, attrs) {
              var avraam = $(element).find('#avraam');
              $(avraam).hide();
  
          }
      }
  });
  </code></pre>
  
  <p>People support that the DOM manipulation should be done inside the directive, so I want to ask <strong>how can I create an ng-click event handler inside the directive</strong>, when the user clicks on the element the elemented will be hidded.</p>