hannahhoward / a1atscript

The Angular 2 Polyfill
MIT License
101 stars 7 forks source link

@Filter could be simpler #28

Open nyarly opened 9 years ago

nyarly commented 9 years ago

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)