Skip to content

Instantly share code, notes, and snippets.

@yeomann
Forked from anein/angularjs.es6.filter.js
Created February 15, 2017 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yeomann/1f6c91e5bb295562696e2ad9970c729f to your computer and use it in GitHub Desktop.
Save yeomann/1f6c91e5bb295562696e2ad9970c729f 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