Cleaning up an Angular module that is using ES6

10 Feb 2016

After working primarily with vanilla JavaScript over the past year, it's been a bit of shock to return to an AngularJS (v1.4.9) application and re-learn the pain of dependency injection, especially in an almost fully compatibilty ES6 world.

I've taken an example module that I can across and have "cleaned" it up to follow my preference along with comments as to why. Ideally, I would have posted the tests as well to show how they would be simplified in conjunction with this clean up.

Original module

"Cleaned" module

"Cleaned" module without comments

Feel free to let me know your thoughts/suggestions by commenting on the gist