-
-
Save yeomann/1f6c91e5bb295562696e2ad9970c729f to your computer and use it in GitHub Desktop.
Creating an angularjs filter using ES6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyFilter { | |
static filter( value ){ | |
return value.toLowerCase(); | |
} | |
} | |
export default MyFilter.filter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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