a1atscript icon indicating copy to clipboard operation
a1atscript copied to clipboard

@Filter could be simpler

Open nyarly opened this issue 10 years ago • 0 comments

Stock Angular 1.3:

angular.module(...).filter("name", function(){
  return function(string, expression){ ... }
})

Since every filter follows this pattern, and stateful or injected filters are discouraged, perhaps A1 could do:

@Filter
export default function(string, expression){ ... }

(at the moment, the wrapping provider function is required)

nyarly avatar Sep 08 '15 22:09 nyarly