Skip to content

Instantly share code, notes, and snippets.

@malikperang
Forked from anein/angularjs.es6.filter.js
Created May 8, 2017 06:26
Show Gist options
  • Save malikperang/ac4a11ec0737cdd7e389692ecd90b2f4 to your computer and use it in GitHub Desktop.
Save malikperang/ac4a11ec0737cdd7e389692ecd90b2f4 to your computer and use it in GitHub Desktop.
Creating an angularjs filter using ES6
class MyFilter {
static filter( value ){
return value.toLowerCase();
}
}
export default MyFilter.filter;
import filter from "./angularjs.es6.filter.js"
angular.module( "module", [] )
.filter( "awesomeFilter", () => filter );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment