title: Passing a custom filter with attributes to a custom directive in angular
body: <p>Is there a way to pass a custom filter as an attribute into a custom directive? So if I have a directive</p>
  
  <pre><code>&lt;my-element value="1234" filter="my-filter:attr1:attr2"&gt;&lt;my-element&gt;
  </code></pre>
  
  <p>as</p>
  
  <pre><code>angular.module("directives", ["filter"]).directive("myElement", function() {
      return {
      restrict: "E",
          replace : true,
          scope   : {
              value   : "@",
              filter  : "@"
          },
          template: function (el, attr) {
              return "&lt;p&gt;{{value | filter}}&lt;/p&gt;";
          },
          link: function($scope){ /* linking stuff */ }
      };
  });
  </code></pre>
  
  <p>with a filter:</p>
  
  <pre><code>angular.module("filter", []).filter("myFilter", function() {
      return function(value, attr1, attr2) {
              return "filtered value";
          };
      };
  });
  </code></pre>
  
  <p>Atm just nothing happens and I don't know what's going wrong here...</p>