title: AngularJS bind clicking instead of ng-click
body: <p>I was looking at AngularJs and have a question, this is my directive:</p>
  
  <pre><code>myApp.directive("enter", function(){
  return{
      restrict: 'A',
      scope:{},
      controller: function($scope){
          $scope.logSomething=function(somevalue){
              console.log(somevalue+" is logged");
          }
      },
      template: '&lt;input type="text" ng-model="myModel"&gt;'+
                '&lt;div ng-click="logSomething(myModel)"&gt;click me&lt;/div&gt;'
  }
  })
  </code></pre>
  
  <p>This works, but my question is how can I do the same thing using <strong>bind clicking</strong> instead of <strong>ng-click</strong> directive? Not that it is better(maybe?), but for curiosity </p>
  
  <p>it should be including something like this but couldn't get the big picture:</p>
  
  <pre><code> function(scope, element, attrs){
      element.bind("click", function(){
          scope.$apply(attrs.enter);
      })
  </code></pre>