title: applying scopes on angular directives and calling object function
body: <p>This code works fine and uses the parent controller scope;</p>
  
  <pre><code>"&lt;button type='button'  post-random-feed &gt;Post review&lt;/button&gt;"
  
  .directive("postRandomFeed",['config',function(){
          return function(scope,element.attrs){ 
  
                  element.bind("click", function(){
                      scope.name ="henry";
                       console.log(element);
                  });
  
  
  
      }
  }]);
  </code></pre>
  
  <p>my problem is that i want to define an isolated scope and return an object instead of a function from the directive. This is my code</p>
  
  <pre><code>"&lt;button type='button'  post-random-feed &gt;Post review&lt;/button&gt;"
  
  .directive("postRandomFeed",['config',function(){
          return { 
  
              restrict :"A",
  
              scope : {
  
                      },
  
              irony : function(element, attrs)
              {   
                  element.bind("click", function(){
                       console.log(element);
                  });
  
  
              }
      };
  }]);
  </code></pre>
  
  <p>How do i call the irony function so that the element registers the click event any mistakes please correct me. Thank you</p>