title: AngularJS: How to pass arguments/functions to a directive?
body: <p>Look at <a href="http://jsfiddle.net/y85Ft/" rel="noreferrer">this Fiddle</a>, what do I have to change, that the expressions in the template get evaluated using the arguments I defined in the HTML? The SAVE-button should call the <code>blabla()</code>-function of the controller, since I pass it?</p>
  
  <pre><code>var myApp = angular.module('MyApp',[])
  myApp.directive('editkeyvalue', function() {
      return {
          restrict: 'E',
          replace: true,
          scope: {
              accept: "expression"
          },
          template : '&lt;div&gt;&lt;label class="control-label"&gt;{{key}}&lt;/label&gt;' +
          '&lt;label class="control-label"&gt;{{key}}&lt;/label&gt;' +
            '&lt;input type="text" ng-model="value" /&gt;'+
          '&lt;button type="button" x-ng-click="cancel()"&gt;CANCEL&lt;/button&gt;' +
          '&lt;button type="submit" x-ng-click="save()"&gt;SAVE&lt;/button&gt;&lt;/div&gt;',
  
        controller: function($scope, $element, $attrs, $location) {
          $scope.save= function() {
            $scope.accept();
          };
        }
      }
  });
  </code></pre>
  
  <p>I do not really see through that. Thanks for help!</p>